From 0fbcf1ca6f6bb6eb7b2aa779559c294d8b0b9951 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 26 Jan 2025 13:45:58 +0300 Subject: [PATCH 01/68] utility/yanky-nvim: init --- configuration.nix | 1 + docs/release-notes/rl-0.8.md | 4 +++ flake.lock | 17 ++++++++++ flake.nix | 5 +++ modules/plugins/utility/default.nix | 18 +++++------ modules/plugins/utility/yanky-nvim/config.nix | 32 +++++++++++++++++++ .../plugins/utility/yanky-nvim/default.nix | 6 ++++ .../plugins/utility/yanky-nvim/yanky-nvim.nix | 28 ++++++++++++++++ 8 files changed, 102 insertions(+), 9 deletions(-) create mode 100644 modules/plugins/utility/yanky-nvim/config.nix create mode 100644 modules/plugins/utility/yanky-nvim/default.nix create mode 100644 modules/plugins/utility/yanky-nvim/yanky-nvim.nix diff --git a/configuration.nix b/configuration.nix index 2159edc8..594e292f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -175,6 +175,7 @@ isMaximal: { icon-picker.enable = isMaximal; surround.enable = isMaximal; diffview-nvim.enable = true; + yanky-nvim.enable = false; motion = { hop.enable = true; leap.enable = true; diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index f5e9d0a0..661aee1d 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -4,6 +4,7 @@ [typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim [render-markdown.nvim]: https://github.com/MeanderingProgrammer/render-markdown.nvim +[yanky.nvim]: https://github.com/gbprod/yanky.nvim - Add [typst-preview.nvim] under `languages.typst.extensions.typst-preview-nvim`. @@ -33,10 +34,13 @@ - Add [](#opt-vim.lsp.lightbulb.autocmd.enable) for manually managing the previously managed lightbulb autocommand. + - A warning will occur if [](#opt-vim.lsp.lightbulb.autocmd.enable) and `vim.lsp.lightbulb.setupOpts.autocmd.enabled` are both set at the same time. Pick only one. +- Add [yanky.nvim] to available plugins, under `vim.utility.yanky-nvim`. + [amadaluzia](https://github.com/amadaluzia): [haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim diff --git a/flake.lock b/flake.lock index ee19b7c8..2b0136fd 100644 --- a/flake.lock +++ b/flake.lock @@ -2761,6 +2761,22 @@ "type": "github" } }, + "plugin-yanky-nvim": { + "flake": false, + "locked": { + "lastModified": 1737126873, + "narHash": "sha256-Gt8kb6sZoNIM2SDWUPyAF5Tw99qMZl+ltUCfyMXgJsU=", + "owner": "gbprod", + "repo": "yanky.nvim", + "rev": "d2696b30e389dced94d5acab728f524a25f308d2", + "type": "github" + }, + "original": { + "owner": "gbprod", + "repo": "yanky.nvim", + "type": "github" + } + }, "root": { "inputs": { "flake-parts": "flake-parts", @@ -2934,6 +2950,7 @@ "plugin-vim-repeat": "plugin-vim-repeat", "plugin-vim-startify": "plugin-vim-startify", "plugin-which-key": "plugin-which-key", + "plugin-yanky-nvim": "plugin-yanky-nvim", "systems": "systems_2" } }, diff --git a/flake.nix b/flake.nix index 5d4728f6..52635132 100644 --- a/flake.nix +++ b/flake.nix @@ -590,6 +590,11 @@ flake = false; }; + plugin-yanky-nvim = { + url = "github:gbprod/yanky.nvim"; + flake = false; + }; + # Note-taking plugin-obsidian-nvim = { url = "github:epwalsh/obsidian.nvim"; diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 8b25ea8f..65ef8680 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -1,19 +1,19 @@ { imports = [ - ./outline ./binds ./ccc + ./diffview + ./fzf-lua ./gestures - ./motion - ./new-file-template - ./telescope ./icon-picker ./images - ./telescope - ./diffview - ./wakatime - ./surround + ./motion + ./new-file-template + ./outline ./preview - ./fzf-lua + ./surround + ./telescope + ./wakatime + ./yanky-nvim ]; } diff --git a/modules/plugins/utility/yanky-nvim/config.nix b/modules/plugins/utility/yanky-nvim/config.nix new file mode 100644 index 00000000..138fd07d --- /dev/null +++ b/modules/plugins/utility/yanky-nvim/config.nix @@ -0,0 +1,32 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.lists) optionals concatLists; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.dag) entryAnywhere; + + cfg = config.vim.utility.yanky-nvim; + usingSqlite = cfg.setupOpts.ring.storage == "sqlite"; +in { + config = mkIf cfg.enable { + vim = { + # TODO: this could probably be lazyloaded. I'm not yet sure which event is + # ideal, so it's loaded normally for now. + startPlugins = concatLists [ + ["yanky-nvim"] + + # If using the sqlite backend, sqlite-lua must be loaded + # alongside yanky. + (optionals usingSqlite [pkgs.vimPlugins.sqlite-lua]) + ]; + + pluginRC.yanky-nvim = entryAnywhere '' + require("yanky").setup(${toLuaObject cfg.setupOpts}); + ''; + }; + }; +} diff --git a/modules/plugins/utility/yanky-nvim/default.nix b/modules/plugins/utility/yanky-nvim/default.nix new file mode 100644 index 00000000..05cb2bea --- /dev/null +++ b/modules/plugins/utility/yanky-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./yanky-nvim.nix + ]; +} diff --git a/modules/plugins/utility/yanky-nvim/yanky-nvim.nix b/modules/plugins/utility/yanky-nvim/yanky-nvim.nix new file mode 100644 index 00000000..95d6a211 --- /dev/null +++ b/modules/plugins/utility/yanky-nvim/yanky-nvim.nix @@ -0,0 +1,28 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.types) enum; +in { + options.vim.utility.yanky-nvim = { + enable = mkEnableOption '' + improved Yank and Put functionalities for Neovim [yanky-nvim] + ''; + + setupOpts = { + ring.storage = mkOption { + type = enum ["shada" "sqlite" "memory"]; + default = "shada"; + example = "sqlite"; + description = '' + storage mode for ring values. + + - shada: this will save pesistantly using Neovim ShaDa feature. + This means that history will be persisted between each session of Neovim. + - memory: each Neovim instance will have his own history and it will be + lost between sessions. + - sqlite: more reliable than `shada`, requires `sqlite.lua` as a dependency. + nvf will add this dependency to `PATH` automatically. + ''; + }; + }; + }; +} From ee89d9d5bc441dcb5de6068450d53275b852d9e5 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 30 Jan 2025 14:12:58 +0300 Subject: [PATCH 02/68] flake: bump rustaceanvim --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 2b0136fd..81738ba6 100644 --- a/flake.lock +++ b/flake.lock @@ -2460,11 +2460,11 @@ "plugin-rustaceanvim": { "flake": false, "locked": { - "lastModified": 1735431742, - "narHash": "sha256-ucZXGbxHtbSKf5n11lL3vb6rD2BxJacIDOgcx32PLzA=", + "lastModified": 1738187731, + "narHash": "sha256-Z4aCPO4MR0Q2ZojT6YBGSa8fb7u5Nd+4Z/rekqhXqDY=", "owner": "mrcjkb", "repo": "rustaceanvim", - "rev": "51c097ebfb65d83baa71f48000b1e5c0a8dcc4fb", + "rev": "4a2f2d2cc04f5b0aa0981f98bb7d002c898318ad", "type": "github" }, "original": { From e5f6aa23ea63dcbf6c918157cf5b9c818286e958 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 31 Jan 2025 01:19:48 +0300 Subject: [PATCH 03/68] flake: change nvim-colorizer URL to the new repo --- flake.lock | 10 +++++----- flake.nix | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 81738ba6..8e5a40d7 100644 --- a/flake.lock +++ b/flake.lock @@ -1836,15 +1836,15 @@ "plugin-nvim-colorizer-lua": { "flake": false, "locked": { - "lastModified": 1735384185, - "narHash": "sha256-quqs3666vQc/4ticc/Z5BHzGxV6UUVE9jVGT07MEMQQ=", - "owner": "NvChad", + "lastModified": 1738229011, + "narHash": "sha256-IEgZnIUeNXRKZ4eV1+KknluyKZj68HBWe1EW+LueuGA=", + "owner": "catgoose", "repo": "nvim-colorizer.lua", - "rev": "8a65c448122fc8fac9c67b2e857b6e830a4afd0b", + "rev": "9b5fe0450bfb2521c6cea29391e5ec571f129136", "type": "github" }, "original": { - "owner": "NvChad", + "owner": "catgoose", "repo": "nvim-colorizer.lua", "type": "github" } diff --git a/flake.nix b/flake.nix index 52635132..eb7f5904 100644 --- a/flake.nix +++ b/flake.nix @@ -645,7 +645,7 @@ }; plugin-nvim-colorizer-lua = { - url = "github:NvChad/nvim-colorizer.lua"; + url = "github:catgoose/nvim-colorizer.lua"; flake = false; }; From 944327329712eda9eec8a86a972e0abd7ea368e6 Mon Sep 17 00:00:00 2001 From: Etherbloom Date: Sun, 2 Feb 2025 15:02:26 +0100 Subject: [PATCH 04/68] languages/ts: register javascript with prettier formatter (#595) --- modules/plugins/languages/ts.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/ts.nix b/modules/plugins/languages/ts.nix index 2530d352..50e6d91c 100644 --- a/modules/plugins/languages/ts.nix +++ b/modules/plugins/languages/ts.nix @@ -82,7 +82,7 @@ ls_sources, null_ls.builtins.formatting.prettier.with({ command = "${cfg.format.package}/bin/prettier", - filetypes = { "typescript" }, + filetypes = { "typescript", "javascript" }, }) ) ''; From 90abd270a68f8de59363ff8c63dcc7e7d561f92c Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 28 Jan 2025 16:17:02 +0300 Subject: [PATCH 05/68] meta: include hacking guidelines in PR template --- .../pull_request_template.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index b2a26919..66fe9c0f 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -7,14 +7,17 @@ or dependency in this section. If your pull request aims to fix an open issue or a please bug, please also link the relevant issue below this line. You may attach an issue to your pull request with `Fixes #` outside this comment, and it will be closed when your pull request is merged. + +A developer package template is provided in flake/develop.nix. If working on a module, you may use +it to test your changes with minimal dependency changes. --> ## Sanity Checking --- From 7b886c98795147464ab69e55d0d19ce4653c773f Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 28 Jan 2025 16:17:52 +0300 Subject: [PATCH 06/68] docs/options: mention manpages for offline viewing --- docs/manual/options.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/manual/options.md b/docs/manual/options.md index 3b70484f..b386347d 100644 --- a/docs/manual/options.md +++ b/docs/manual/options.md @@ -4,6 +4,10 @@ Below are the module options provided by nvf, in no particular order. Most options will include useful comments, warnings or setup tips on how a module option is meant to be used as well as examples in complex cases. +An offline version of this page is bundled with nvf as a part of the manpages +which you can access with `man 5 nvf`. Please us know if you believe any of the +options below are missing useful examples. +