From 3bf7abd6c9807bbbb2c791fdb6c9be8e36618dd6 Mon Sep 17 00:00:00 2001 From: Adam Szalkowski Date: Sat, 1 Mar 2025 14:44:08 +0100 Subject: [PATCH 001/131] plugins/nvim-docs-view: fix default mappings (#675) --- modules/plugins/lsp/nvim-docs-view/nvim-docs-view.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plugins/lsp/nvim-docs-view/nvim-docs-view.nix b/modules/plugins/lsp/nvim-docs-view/nvim-docs-view.nix index 105aebec..df571123 100644 --- a/modules/plugins/lsp/nvim-docs-view/nvim-docs-view.nix +++ b/modules/plugins/lsp/nvim-docs-view/nvim-docs-view.nix @@ -57,8 +57,8 @@ in { }; mappings = { - viewToggle = mkMappingOption "Open or close the docs view panel" "lvt"; - viewUpdate = mkMappingOption "Manually update the docs view panel" "lvu"; + viewToggle = mkMappingOption "Open or close the docs view panel" "lvt"; + viewUpdate = mkMappingOption "Manually update the docs view panel" "lvu"; }; }; } From 0fdfb9bf3b419dba3b1ccd2728ed6a366866a942 Mon Sep 17 00:00:00 2001 From: MaxMur <31189199+TheMaxMur@users.noreply.github.com> Date: Sun, 2 Mar 2025 16:59:32 +0300 Subject: [PATCH 002/131] languages/yaml: Init (#676) --- docs/release-notes/rl-0.8.md | 4 ++ modules/plugins/languages/default.nix | 1 + modules/plugins/languages/yaml.nix | 72 +++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 modules/plugins/languages/yaml.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 0440f38f..d81b142f 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -192,3 +192,7 @@ - Add formatters for go: [gofmt](https://go.dev/blog/gofmt), [golines](https://github.com/segmentio/golines) and [gofumpt](https://github.com/mvdan/gofumpt) + +[MaxMur](https://github.com/TheMaxMur) + +- Add YAML support under `vim.languages.yaml`. diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index 219e04fb..08d676b9 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -39,6 +39,7 @@ in { ./nu.nix ./odin.nix ./wgsl.nix + ./yaml.nix ./ruby.nix ]; diff --git a/modules/plugins/languages/yaml.nix b/modules/plugins/languages/yaml.nix new file mode 100644 index 00000000..2892f607 --- /dev/null +++ b/modules/plugins/languages/yaml.nix @@ -0,0 +1,72 @@ +{ + pkgs, + config, + lib, + ... +}: let + inherit (builtins) attrNames; + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.lists) isList; + inherit (lib.types) enum either listOf package str; + inherit (lib.nvim.types) mkGrammarOption; + inherit (lib.nvim.lua) expToLua; + + cfg = config.vim.languages.yaml; + + defaultServer = "yaml-language-server"; + servers = { + yaml-language-server = { + package = pkgs.nodePackages.yaml-language-server; + lspConfig = '' + lspconfig.yamlls.setup { + capabilities = capabilities; + on_attach = default_on_attach; + cmd = ${ + if isList cfg.lsp.package + then expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/yaml-language-server", "--stdio"}'' + }, + } + ''; + }; + }; +in { + options.vim.languages.yaml = { + enable = mkEnableOption "YAML language support"; + + treesitter = { + enable = mkEnableOption "YAML treesitter"; + + package = mkGrammarOption pkgs "yaml"; + }; + + lsp = { + enable = mkEnableOption "YAML LSP support"; + + server = mkOption { + type = enum (attrNames servers); + default = defaultServer; + description = "YAML LSP server to use"; + }; + + package = mkOption { + type = either package (listOf str); + default = servers.${cfg.lsp.server}.package; + description = "YAML LSP server package"; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + (mkIf cfg.treesitter.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [cfg.treesitter.package]; + }) + + (mkIf cfg.lsp.enable { + vim.lsp.lspconfig.enable = true; + vim.lsp.lspconfig.sources.yaml-lsp = servers.${cfg.lsp.server}.lspConfig; + }) + ]); +} From 60ebec1956a9e30e840bf03a77abb64968de1021 Mon Sep 17 00:00:00 2001 From: alfarel Date: Sun, 2 Mar 2025 12:19:29 -0500 Subject: [PATCH 003/131] utility/yazi-nvim: add missing dependency (snacks.nvim) `:checkhealth yazi` was warning about it. Project `README` recently added it to the requirements. --- docs/release-notes/rl-0.8.md | 4 ++++ modules/plugins/utility/yazi-nvim/config.nix | 1 + npins/sources.json | 12 ++++++++++++ 3 files changed, 17 insertions(+) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index d81b142f..6027736a 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -196,3 +196,7 @@ [MaxMur](https://github.com/TheMaxMur) - Add YAML support under `vim.languages.yaml`. + +[alfarel](https://github.com/alfarelcynthesis): + +- Add missing `yazi.nvim` dependency (`snacks.nvim`). diff --git a/modules/plugins/utility/yazi-nvim/config.nix b/modules/plugins/utility/yazi-nvim/config.nix index a781e5f0..e6a85d68 100644 --- a/modules/plugins/utility/yazi-nvim/config.nix +++ b/modules/plugins/utility/yazi-nvim/config.nix @@ -15,6 +15,7 @@ in { config = mkIf cfg.enable { vim = { + startPlugins = ["snacks-nvim"]; lazy.plugins."yazi.nvim" = { package = pkgs.vimPlugins.yazi-nvim; setupModule = "yazi"; diff --git a/npins/sources.json b/npins/sources.json index 0dc9e21b..d196ff99 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1880,6 +1880,18 @@ "url": "https://github.com/m4xshen/smartcolumn.nvim/archive/92f3773af80d674f1eb61e112dca79e2fa449fd1.tar.gz", "hash": "0k1xnyvblshn4fhbxgl0i34j22n55xlwr09sdmb23l57br5rb07q" }, + "snacks-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "folke", + "repo": "snacks.nvim" + }, + "branch": "main", + "revision": "bc0630e43be5699bb94dadc302c0d21615421d93", + "url": "https://github.com/folke/snacks.nvim/archive/bc0630e43be5699bb94dadc302c0d21615421d93.tar.gz", + "hash": "0a5nw7xa33shag1h12gf930g3vcixbwk8dxv0ji4980ycskh238v" + }, "sqls-nvim": { "type": "Git", "repository": { From 6e35b04e748fd90458328f39b8372d1f82ffb7e0 Mon Sep 17 00:00:00 2001 From: MaxMur <31189199+TheMaxMur@users.noreply.github.com> Date: Sun, 2 Mar 2025 20:51:54 +0300 Subject: [PATCH 004/131] languages/yaml: fix enableLSP/enableTreesitter defaults (#680) --- modules/plugins/languages/yaml.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plugins/languages/yaml.nix b/modules/plugins/languages/yaml.nix index 2892f607..ef17b964 100644 --- a/modules/plugins/languages/yaml.nix +++ b/modules/plugins/languages/yaml.nix @@ -36,13 +36,13 @@ in { enable = mkEnableOption "YAML language support"; treesitter = { - enable = mkEnableOption "YAML treesitter"; + enable = mkEnableOption "YAML treesitter" // {default = config.vim.languages.enableTreesitter;}; package = mkGrammarOption pkgs "yaml"; }; lsp = { - enable = mkEnableOption "YAML LSP support"; + enable = mkEnableOption "YAML LSP support" // {default = config.vim.languages.enableLSP;}; server = mkOption { type = enum (attrNames servers); From d12846211b3430c0c0ec73b4395f7df8a64ea668 Mon Sep 17 00:00:00 2001 From: TheColorman Date: Mon, 3 Mar 2025 21:12:58 +0100 Subject: [PATCH 005/131] session/nvim-session-manager: fix autoload_mode type Fixes `Error detected while processing VimEnter Autocommands for "*"` by using an enum type for "autoload_mode" instead of a string --- docs/release-notes/rl-0.8.md | 5 +++++ .../session/nvim-session-manager/nvim-session-manager.nix | 3 +++ 2 files changed, 8 insertions(+) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 6027736a..b16ed6b2 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -200,3 +200,8 @@ [alfarel](https://github.com/alfarelcynthesis): - Add missing `yazi.nvim` dependency (`snacks.nvim`). + +[TheColorman](https://github.com/TheColorman) + +- Fix plugin `setupOpts` for `neovim-session-manager` having an invalid value + for `autoload_mode`. diff --git a/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix b/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix index 05d0b01b..41cff8a4 100644 --- a/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix +++ b/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix @@ -1,5 +1,6 @@ {lib, ...}: let inherit (lib.types) nullOr str bool; + inherit (lib.generators) mkLuaInline; inherit (lib) mkEnableOption mkOption types mkRenamedOptionModule; in { imports = let @@ -68,6 +69,8 @@ in { autoload_mode = mkOption { type = types.enum ["Disabled" "CurrentDir" "LastSession"]; + # variable `sm` referenced from ./config.nix + apply = value: mkLuaInline "sm.AutoloadMode.${value}"; default = "LastSession"; description = "Define what to do when Neovim is started without arguments. Possible values: Disabled, CurrentDir, LastSession"; }; From 27978c7186b26e78c7765de4c093a816617f9f39 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 4 Mar 2025 23:30:52 +0300 Subject: [PATCH 006/131] session/nvim-session-manager: fix option descriptions; more explicit library inherits --- .../nvim-session-manager.nix | 83 +++++++++++++------ 1 file changed, 58 insertions(+), 25 deletions(-) diff --git a/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix b/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix index 41cff8a4..e60a4a5d 100644 --- a/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix +++ b/modules/plugins/session/nvim-session-manager/nvim-session-manager.nix @@ -1,7 +1,10 @@ {lib, ...}: let - inherit (lib.types) nullOr str bool; + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.modules) mkRenamedOptionModule; + inherit (lib.strings) isString; + inherit (lib.types) nullOr str bool int enum listOf either; inherit (lib.generators) mkLuaInline; - inherit (lib) mkEnableOption mkOption types mkRenamedOptionModule; + inherit (lib.nvim.types) luaInline mkPluginSetupOption; in { imports = let renameSetupOpt = oldPath: newPath: @@ -51,70 +54,100 @@ in { usePicker = mkOption { type = bool; default = true; - description = "Whether or not we should use dressing.nvim to build a session picker UI"; + description = '' + Whether we should use `dressing.nvim` to build a session picker UI + ''; }; - setupOpts = { + setupOpts = mkPluginSetupOption "which-key" { path_replacer = mkOption { - type = types.str; + type = str; default = "__"; - description = "The character to which the path separator will be replaced for session files"; + description = '' + The character to which the path separator will be replaced for session files + ''; }; colon_replacer = mkOption { - type = types.str; + type = str; default = "++"; - description = "The character to which the colon symbol will be replaced for session files"; + description = '' + The character to which the colon symbol will be replaced for session files + ''; }; autoload_mode = mkOption { - type = types.enum ["Disabled" "CurrentDir" "LastSession"]; - # variable `sm` referenced from ./config.nix - apply = value: mkLuaInline "sm.AutoloadMode.${value}"; + type = either (enum ["Disabled" "CurrentDir" "LastSession"]) luaInline; + # Variable 'sm' is defined in the pluginRC of nvim-session-manager. The + # definition is as follows: `local sm = require('session_manager.config')` + apply = val: + if isString val + then mkLuaInline "sm.AutoloadMode.${val}" + else val; default = "LastSession"; - description = "Define what to do when Neovim is started without arguments. Possible values: Disabled, CurrentDir, LastSession"; + description = '' + Define what to do when Neovim is started without arguments. + + Takes either one of `"Disabled"`, `"CurrentDir"`, `"LastSession` in which case the value + will be inserted into `sm.AutoloadMode.`, or an inline Lua value. + ''; }; max_path_length = mkOption { - type = types.nullOr types.int; + type = nullOr int; default = 80; - description = "Shorten the display path if length exceeds this threshold. Use 0 if don't want to shorten the path at all"; + description = '' + Shorten the display path if length exceeds this threshold. + + Use `0` if don't want to shorten the path at all + ''; }; autosave_last_session = mkOption { - type = types.bool; + type = bool; default = true; - description = "Automatically save last session on exit and on session switch"; + description = '' + Automatically save last session on exit and on session switch + ''; }; autosave_ignore_not_normal = mkOption { - type = types.bool; + type = bool; default = true; - description = "Plugin will not save a session when no buffers are opened, or all of them aren't writable or listed"; + description = '' + Plugin will not save a session when no buffers are opened, or all of them are + not writable or listed + ''; }; autosave_ignore_dirs = mkOption { - type = types.listOf types.str; + type = listOf str; default = []; description = "A list of directories where the session will not be autosaved"; }; autosave_ignore_filetypes = mkOption { - type = types.listOf types.str; + type = listOf str; default = ["gitcommit"]; - description = "All buffers of these file types will be closed before the session is saved"; + description = '' + All buffers of these file types will be closed before the session is saved + ''; }; autosave_ignore_buftypes = mkOption { - type = types.listOf types.str; + type = listOf str; default = []; - description = "All buffers of these buffer types will be closed before the session is saved"; + description = '' + All buffers of these buffer types will be closed before the session is saved + ''; }; autosave_only_in_session = mkOption { - type = types.bool; + type = bool; default = false; - description = "Always autosaves session. If true, only autosaves after a session is active"; + description = '' + Always autosaves session. If `true`, only autosaves after a session is active + ''; }; }; }; From 85ca2bc11fe59fc0eb8d0064264b4341dd4c12fb Mon Sep 17 00:00:00 2001 From: alfarel Date: Tue, 25 Feb 2025 21:03:46 -0500 Subject: [PATCH 007/131] utility/mkdir-nvim: init --- docs/release-notes/rl-0.8.md | 2 ++ modules/plugins/utility/default.nix | 1 + modules/plugins/utility/mkdir/config.nix | 12 ++++++++++++ modules/plugins/utility/mkdir/default.nix | 6 ++++++ modules/plugins/utility/mkdir/mkdir.nix | 7 +++++++ npins/sources.json | 12 ++++++++++++ 6 files changed, 40 insertions(+) create mode 100644 modules/plugins/utility/mkdir/config.nix create mode 100644 modules/plugins/utility/mkdir/default.nix create mode 100644 modules/plugins/utility/mkdir/mkdir.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index b16ed6b2..9679a2c1 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -200,6 +200,8 @@ [alfarel](https://github.com/alfarelcynthesis): - Add missing `yazi.nvim` dependency (`snacks.nvim`). +- Add [mkdir.nvim](https://github.com/jghauser/mkdir.nvim) plugin + for automatic creation of parent directories when editing a nested file. [TheColorman](https://github.com/TheColorman) diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 47579070..02d155ee 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -8,6 +8,7 @@ ./icon-picker ./images ./leetcode-nvim + ./mkdir ./motion ./multicursors ./new-file-template diff --git a/modules/plugins/utility/mkdir/config.nix b/modules/plugins/utility/mkdir/config.nix new file mode 100644 index 00000000..2f6a1fe7 --- /dev/null +++ b/modules/plugins/utility/mkdir/config.nix @@ -0,0 +1,12 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + cfg = config.vim.utility.mkdir; +in { + vim = mkIf cfg.enable { + startPlugins = ["mkdir-nvim"]; + }; +} diff --git a/modules/plugins/utility/mkdir/default.nix b/modules/plugins/utility/mkdir/default.nix new file mode 100644 index 00000000..1ee6379b --- /dev/null +++ b/modules/plugins/utility/mkdir/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./mkdir.nix + ]; +} diff --git a/modules/plugins/utility/mkdir/mkdir.nix b/modules/plugins/utility/mkdir/mkdir.nix new file mode 100644 index 00000000..c591e6e6 --- /dev/null +++ b/modules/plugins/utility/mkdir/mkdir.nix @@ -0,0 +1,7 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; +in { + options.vim.utility.mkdir.enable = mkEnableOption '' + parent directory creation when editing a nested path that does not exist using `mkdir.nvim` + ''; +} diff --git a/npins/sources.json b/npins/sources.json index d196ff99..957d3b93 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1205,6 +1205,18 @@ "url": "https://github.com/wfxr/minimap.vim/archive/57287e2dd28fa3e63276a32d11c729df14741d54.tar.gz", "hash": "05k4cgcrz0gj92xy685bd4p6nh2jmaywc2f5sw1lap0v685h7n79" }, + "mkdir-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "jghauser", + "repo": "mkdir.nvim" + }, + "branch": "main", + "revision": "c55d1dee4f099528a1853b28bb28caa802eba217", + "url": "https://github.com/jghauser/mkdir.nvim/archive/c55d1dee4f099528a1853b28bb28caa802eba217.tar.gz", + "hash": "0zpyvkbw7wfqdxfgidr7zfxqb5ldci4pflx50rsm1hbwai0ybv23" + }, "modes-nvim": { "type": "Git", "repository": { From 9209a9da37616f1d1b0f1272a87e627d8ccc3218 Mon Sep 17 00:00:00 2001 From: alfarel Date: Tue, 25 Feb 2025 21:16:32 -0500 Subject: [PATCH 008/131] utility/nix-develop: init --- docs/release-notes/rl-0.8.md | 2 ++ modules/plugins/utility/default.nix | 1 + modules/plugins/utility/nix-develop/config.nix | 12 ++++++++++++ modules/plugins/utility/nix-develop/default.nix | 6 ++++++ modules/plugins/utility/nix-develop/nix-develop.nix | 5 +++++ npins/sources.json | 12 ++++++++++++ 6 files changed, 38 insertions(+) create mode 100644 modules/plugins/utility/nix-develop/config.nix create mode 100644 modules/plugins/utility/nix-develop/default.nix create mode 100644 modules/plugins/utility/nix-develop/nix-develop.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 9679a2c1..85f21580 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -202,6 +202,8 @@ - Add missing `yazi.nvim` dependency (`snacks.nvim`). - Add [mkdir.nvim](https://github.com/jghauser/mkdir.nvim) plugin for automatic creation of parent directories when editing a nested file. +- Add [nix-develop.nvim](https://github.com/figsoda/nix-develop.nvim) plugin + for in-neovim `nix develop`, `nix shell` and more. [TheColorman](https://github.com/TheColorman) diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 02d155ee..6a4b4a7e 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -12,6 +12,7 @@ ./motion ./multicursors ./new-file-template + ./nix-develop ./outline ./preview ./surround diff --git a/modules/plugins/utility/nix-develop/config.nix b/modules/plugins/utility/nix-develop/config.nix new file mode 100644 index 00000000..e1c57ff6 --- /dev/null +++ b/modules/plugins/utility/nix-develop/config.nix @@ -0,0 +1,12 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + cfg = config.vim.utility.nix-develop; +in { + vim = mkIf cfg.enable { + startPlugins = ["nix-develop-nvim"]; + }; +} diff --git a/modules/plugins/utility/nix-develop/default.nix b/modules/plugins/utility/nix-develop/default.nix new file mode 100644 index 00000000..7d227af5 --- /dev/null +++ b/modules/plugins/utility/nix-develop/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./nix-develop.nix + ]; +} diff --git a/modules/plugins/utility/nix-develop/nix-develop.nix b/modules/plugins/utility/nix-develop/nix-develop.nix new file mode 100644 index 00000000..cee77a6d --- /dev/null +++ b/modules/plugins/utility/nix-develop/nix-develop.nix @@ -0,0 +1,5 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; +in { + options.vim.utility.nix-develop.enable = mkEnableOption "in-neovim `nix develop`, `nix shell`, and more using `nix-develop.nvim`"; +} diff --git a/npins/sources.json b/npins/sources.json index 957d3b93..8a4e555e 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1316,6 +1316,18 @@ "url": "https://github.com/otavioschwanck/new-file-template.nvim/archive/6ac66669dbf2dc5cdee184a4fe76d22465ca67e8.tar.gz", "hash": "0c7378c3w6bniclp666rq15c28akb0sjy58ayva0wpyin4k26hl3" }, + "nix-develop-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "figsoda", + "repo": "nix-develop.nvim" + }, + "branch": "main", + "revision": "afea026f5c478c000a8af8de87f7b711676387ab", + "url": "https://github.com/figsoda/nix-develop.nvim/archive/afea026f5c478c000a8af8de87f7b711676387ab.tar.gz", + "hash": "0nwjgr19pzdxd7yygz380b388qcfbzp9svs916kh0zayzi9yxc2k" + }, "noice-nvim": { "type": "Git", "repository": { From a5d7313abb8741ff2c3f3735e1b9a03f50d4e6ca Mon Sep 17 00:00:00 2001 From: alfarel Date: Tue, 25 Feb 2025 21:24:43 -0500 Subject: [PATCH 009/131] utility/direnv-vim: init --- docs/release-notes/rl-0.8.md | 2 ++ modules/plugins/utility/default.nix | 1 + modules/plugins/utility/direnv/config.nix | 13 +++++++++++++ modules/plugins/utility/direnv/default.nix | 6 ++++++ modules/plugins/utility/direnv/direnv.nix | 5 +++++ npins/sources.json | 12 ++++++++++++ 6 files changed, 39 insertions(+) create mode 100644 modules/plugins/utility/direnv/config.nix create mode 100644 modules/plugins/utility/direnv/default.nix create mode 100644 modules/plugins/utility/direnv/direnv.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 85f21580..5cf939be 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -204,6 +204,8 @@ for automatic creation of parent directories when editing a nested file. - Add [nix-develop.nvim](https://github.com/figsoda/nix-develop.nvim) plugin for in-neovim `nix develop`, `nix shell` and more. +- Add [direnv.vim](https://github.com/direnv/direnv.vim) plugin + for automatic syncing of nvim shell environment with direnv's. [TheColorman](https://github.com/TheColorman) diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 6a4b4a7e..0f0956fb 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -3,6 +3,7 @@ ./binds ./ccc ./diffview + ./direnv ./fzf-lua ./gestures ./icon-picker diff --git a/modules/plugins/utility/direnv/config.nix b/modules/plugins/utility/direnv/config.nix new file mode 100644 index 00000000..b2211deb --- /dev/null +++ b/modules/plugins/utility/direnv/config.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.utility.direnv; +in { + vim = mkIf cfg.enable { + startPlugins = ["direnv-vim"]; + }; +} diff --git a/modules/plugins/utility/direnv/default.nix b/modules/plugins/utility/direnv/default.nix new file mode 100644 index 00000000..7a489920 --- /dev/null +++ b/modules/plugins/utility/direnv/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./direnv.nix + ]; +} diff --git a/modules/plugins/utility/direnv/direnv.nix b/modules/plugins/utility/direnv/direnv.nix new file mode 100644 index 00000000..98d3f1f6 --- /dev/null +++ b/modules/plugins/utility/direnv/direnv.nix @@ -0,0 +1,5 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; +in { + options.vim.utility.direnv.enable = mkEnableOption "syncing nvim shell environment with direnv's using `direnv.vim`"; +} diff --git a/npins/sources.json b/npins/sources.json index 8a4e555e..b69bf509 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -315,6 +315,18 @@ "url": "https://github.com/sindrets/diffview.nvim/archive/4516612fe98ff56ae0415a259ff6361a89419b0a.tar.gz", "hash": "0brabpd02596hg98bml118bx6z2sly98kf1cr2p0xzybiinb4zs9" }, + "direnv-vim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "direnv", + "repo": "direnv.vim" + }, + "branch": "master", + "revision": "ab2a7e08dd630060cd81d7946739ac7442a4f269", + "url": "https://github.com/direnv/direnv.vim/archive/ab2a7e08dd630060cd81d7946739ac7442a4f269.tar.gz", + "hash": "1hhwfnaj9ibz17ggxvhzrkinghfy51fqfa0bs482z484jpvjc31g" + }, "dracula": { "type": "Git", "repository": { From 9e35fd8d02c745291c0a0504baae53bcad5c8637 Mon Sep 17 00:00:00 2001 From: alfarel Date: Tue, 25 Feb 2025 22:33:11 -0500 Subject: [PATCH 010/131] completion/blink-cmp: blink sources options Use a submodule to allow arbitrary source additions. Automatically load sources that are enabled. Automatically add enabled sources via blink-cmp setupOpts. Prepopulate with a few basic sources, disabled by default. --- docs/release-notes/rl-0.8.md | 1 + .../completion/blink-cmp/blink-cmp.nix | 61 ++++++++++++++++++- .../plugins/completion/blink-cmp/config.nix | 56 +++++++++++------ npins/sources.json | 36 +++++++++++ 4 files changed, 136 insertions(+), 18 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 5cf939be..a28ffd67 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -206,6 +206,7 @@ for in-neovim `nix develop`, `nix shell` and more. - Add [direnv.vim](https://github.com/direnv/direnv.vim) plugin for automatic syncing of nvim shell environment with direnv's. +- Add [blink.cmp] source options and some default-disabled sources. [TheColorman](https://github.com/TheColorman) diff --git a/modules/plugins/completion/blink-cmp/blink-cmp.nix b/modules/plugins/completion/blink-cmp/blink-cmp.nix index 13cdb9f4..9bb76b71 100644 --- a/modules/plugins/completion/blink-cmp/blink-cmp.nix +++ b/modules/plugins/completion/blink-cmp/blink-cmp.nix @@ -2,7 +2,7 @@ inherit (lib.options) mkEnableOption mkOption literalMD; inherit (lib.types) listOf str either attrsOf submodule enum anything int nullOr; inherit (lib.generators) mkLuaInline; - inherit (lib.nvim.types) mkPluginSetupOption luaInline; + inherit (lib.nvim.types) mkPluginSetupOption luaInline pluginType; inherit (lib.nvim.binds) mkMappingOption; inherit (lib.nvim.config) mkBool; @@ -118,5 +118,64 @@ in { scrollDocsUp = mkMappingOption "Scroll docs up [blink.cmp]" ""; scrollDocsDown = mkMappingOption "Scroll docs down [blink.cmp]" ""; }; + + sourcePlugins = let + sourcePluginType = submodule { + options = { + package = mkOption { + type = pluginType; + description = '' + `blink-cmp` source plugin package. + ''; + }; + module = mkOption { + type = str; + description = '' + Value of {option}`vim.autocomplete.blink-cmp.setupOpts.sources.providers..module`. + + Should be present in the source's documentation. + ''; + }; + enable = mkEnableOption "this source"; + }; + }; + in + mkOption { + type = submodule { + freeformType = attrsOf sourcePluginType; + options = let + defaultSourcePluginOption = name: package: module: { + package = mkOption { + type = pluginType; + default = package; + description = '' + `blink-cmp` ${name} source plugin package. + ''; + }; + module = mkOption { + type = str; + default = module; + description = '' + Value of {option}`vim.autocomplete.blink-cmp.setupOpts.sources.providers.${name}.module`. + ''; + }; + enable = mkEnableOption "${name} source"; + }; + in { + # emoji completion after : + emoji = defaultSourcePluginOption "emoji" "blink-emoji-nvim" "blink-emoji"; + # spelling suggestions as completions + spell = defaultSourcePluginOption "spell" "blink-cmp-spell" "blink-cmp-spell"; + # words from nearby files + ripgrep = defaultSourcePluginOption "ripgrep" "blink-ripgrep-nvim" "blink-ripgrep"; + }; + }; + default = {}; + description = '' + `blink.cmp` sources. + + Attribute names must be source names used in {option}`vim.autocomplete.blink-cmp.setupOpts.sources.default`. + ''; + }; }; } diff --git a/modules/plugins/completion/blink-cmp/config.nix b/modules/plugins/completion/blink-cmp/config.nix index 914821f9..96ced502 100644 --- a/modules/plugins/completion/blink-cmp/config.nix +++ b/modules/plugins/completion/blink-cmp/config.nix @@ -6,6 +6,8 @@ inherit (lib.modules) mkIf; inherit (lib.strings) optionalString; inherit (lib.generators) mkLuaInline; + inherit (lib.attrsets) attrValues filterAttrs; + inherit (lib.lists) map; inherit (lib.nvim.lua) toLuaObject; inherit (builtins) concatStringsSep typeOf tryEval attrNames mapAttrs; @@ -19,9 +21,12 @@ else if (plugin ? pname && (tryEval plugin.pname).success) then plugin.pname else plugin.name; + + enabledBlinkSources = filterAttrs (_source: definition: definition.enable) cfg.sourcePlugins; + blinkSourcePlugins = map (definition: definition.package) (attrValues enabledBlinkSources); in { vim = mkIf cfg.enable { - startPlugins = ["blink-compat"]; + startPlugins = ["blink-compat"] ++ blinkSourcePlugins; lazy.plugins = { blink-cmp = { package = "blink-cmp"; @@ -32,12 +37,14 @@ in { # # event = ["InsertEnter" "CmdlineEnter"]; - after = '' - ${optionalString config.vim.lazy.enable - (concatStringsSep "\n" (map - (package: "require('lz.n').trigger_load(${toLuaObject (getPluginName package)})") - cmpCfg.sourcePlugins))} - ''; + after = + # lua + '' + ${optionalString config.vim.lazy.enable + (concatStringsSep "\n" (map + (package: "require('lz.n').trigger_load(${toLuaObject (getPluginName package)})") + cmpCfg.sourcePlugins))} + ''; }; }; @@ -45,13 +52,26 @@ in { enableSharedCmpSources = true; blink-cmp.setupOpts = { sources = { - default = ["lsp" "path" "snippets" "buffer"] ++ (attrNames cmpCfg.sources); + default = + [ + "lsp" + "path" + "snippets" + "buffer" + ] + ++ (attrNames cmpCfg.sources) + ++ (attrNames enabledBlinkSources); providers = mapAttrs (name: _: { inherit name; module = "blink.compat.source"; }) - cmpCfg.sources; + cmpCfg.sources + // (mapAttrs (name: definition: { + inherit name; + inherit (definition) module; + }) + enabledBlinkSources); }; snippets = mkIf config.vim.snippets.luasnip.enable { preset = "luasnip"; @@ -67,16 +87,18 @@ in { ${mappings.next} = [ "select_next" "snippet_forward" - (mkLuaInline '' - function(cmp) - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - has_words_before = col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + (mkLuaInline + # lua + '' + function(cmp) + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + has_words_before = col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil - if has_words_before then - return cmp.show() + if has_words_before then + return cmp.show() + end end - end - '') + '') "fallback" ]; ${mappings.previous} = [ diff --git a/npins/sources.json b/npins/sources.json index b69bf509..a68a1ea4 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -51,6 +51,18 @@ "url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v0.12.4", "hash": "0jdifjifxjqa8r80wlqgkn5rm48wziap92340xz228nrgd0c9g69" }, + "blink-cmp-spell": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ribru17", + "repo": "blink-cmp-spell" + }, + "branch": "master", + "revision": "38d6797dea6f72baa6e8b3bfca6da96d8fcac64d", + "url": "https://github.com/ribru17/blink-cmp-spell/archive/38d6797dea6f72baa6e8b3bfca6da96d8fcac64d.tar.gz", + "hash": "19pnasa446iiapgsr3z2fpk0nnrzh8g5wrzrq8n0y4q0z6spc9f6" + }, "blink-compat": { "type": "Git", "repository": { @@ -63,6 +75,30 @@ "url": "https://github.com/saghen/blink.compat/archive/4104671562c663d059d91a99da3780bead5bc467.tar.gz", "hash": "0bsf8kg5s3m1xk9d4n0yl0h5xyk484hip3z8va547f6ibim9ccv4" }, + "blink-emoji-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "moyiz", + "repo": "blink-emoji.nvim" + }, + "branch": "master", + "revision": "a77aebc092ebece1eed108f301452ae774d6b67a", + "url": "https://github.com/moyiz/blink-emoji.nvim/archive/a77aebc092ebece1eed108f301452ae774d6b67a.tar.gz", + "hash": "0n4qv2mk7zx910gnwf9ri2w5qxwx8szx99nqqzik4yyvl4axm41d" + }, + "blink-ripgrep-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "mikavilpas", + "repo": "blink-ripgrep.nvim" + }, + "branch": "main", + "revision": "305e1ae5363f527abdfd71915a3fe1f42af52824", + "url": "https://github.com/mikavilpas/blink-ripgrep.nvim/archive/305e1ae5363f527abdfd71915a3fe1f42af52824.tar.gz", + "hash": "1hcfyicgf33dlr2hhgnhhzdcxxqw1v8v1yjfbnwvlcsgw0rhjl8w" + }, "bufdelete-nvim": { "type": "Git", "repository": { From 449b943b9579f8104438fa4d580333c54c74bfca Mon Sep 17 00:00:00 2001 From: alfarel Date: Tue, 25 Feb 2025 23:17:19 -0500 Subject: [PATCH 011/131] completion/blink-cmp: option to enable friendly-snippets Just adds it to the environment, `blink-cmp` will pick up on it automatically. --- docs/release-notes/rl-0.8.md | 3 +++ modules/plugins/completion/blink-cmp/blink-cmp.nix | 2 ++ modules/plugins/completion/blink-cmp/config.nix | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index a28ffd67..dfc232b8 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -207,6 +207,9 @@ - Add [direnv.vim](https://github.com/direnv/direnv.vim) plugin for automatic syncing of nvim shell environment with direnv's. - Add [blink.cmp] source options and some default-disabled sources. +- Add [blink.cmp] option to add + [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) + so blink.cmp can source snippets from it. [TheColorman](https://github.com/TheColorman) diff --git a/modules/plugins/completion/blink-cmp/blink-cmp.nix b/modules/plugins/completion/blink-cmp/blink-cmp.nix index 9bb76b71..4290e1cb 100644 --- a/modules/plugins/completion/blink-cmp/blink-cmp.nix +++ b/modules/plugins/completion/blink-cmp/blink-cmp.nix @@ -177,5 +177,7 @@ in { Attribute names must be source names used in {option}`vim.autocomplete.blink-cmp.setupOpts.sources.default`. ''; }; + + friendly-snippets.enable = mkEnableOption "friendly-snippets for blink to source from automatically"; }; } diff --git a/modules/plugins/completion/blink-cmp/config.nix b/modules/plugins/completion/blink-cmp/config.nix index 96ced502..875a4fd4 100644 --- a/modules/plugins/completion/blink-cmp/config.nix +++ b/modules/plugins/completion/blink-cmp/config.nix @@ -7,7 +7,7 @@ inherit (lib.strings) optionalString; inherit (lib.generators) mkLuaInline; inherit (lib.attrsets) attrValues filterAttrs; - inherit (lib.lists) map; + inherit (lib.lists) map optional; inherit (lib.nvim.lua) toLuaObject; inherit (builtins) concatStringsSep typeOf tryEval attrNames mapAttrs; @@ -26,7 +26,7 @@ blinkSourcePlugins = map (definition: definition.package) (attrValues enabledBlinkSources); in { vim = mkIf cfg.enable { - startPlugins = ["blink-compat"] ++ blinkSourcePlugins; + startPlugins = ["blink-compat"] ++ blinkSourcePlugins ++ (optional cfg.friendly-snippets.enable "friendly-snippets"); lazy.plugins = { blink-cmp = { package = "blink-cmp"; From 0e00c41a42f11b0bc28c3a5523e52bce9b1d1c15 Mon Sep 17 00:00:00 2001 From: alfarel Date: Tue, 25 Feb 2025 23:37:33 -0500 Subject: [PATCH 012/131] docs/release-notes: fix missing colons and periods Also fixes a misaligned contributor name. --- docs/release-notes/rl-0.8.md | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index dfc232b8..cf4dd169 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -3,7 +3,7 @@ ## Breaking changes - `git-conflict` keybinds are now prefixed with `` to avoid conflicting - with builtins + with builtins. [NotAShelf](https://github.com/notashelf): @@ -18,7 +18,7 @@ - Add a search widget to the options page in the nvf manual. - Add [render-markdown.nvim] under - `languages.markdown.extensions.render-markdown-nvim` + `languages.markdown.extensions.render-markdown-nvim`. - Implement [](#opt-vim.git.gitsigns.setupOpts) for user-specified setup table in gitsigns configuration. @@ -62,7 +62,7 @@ [blink.cmp]: https://github.com/saghen/blink.cmp -- Add [blink.cmp] support +- Add [blink.cmp] support. [diniamo](https://github.com/diniamo): @@ -76,8 +76,8 @@ [aerial.nvim]: (https://github.com/stevearc/aerial.nvim) [nvim-ufo]: (https://github.com/kevinhwang91/nvim-ufo) -- Add [aerial.nvim] -- Add [nvim-ufo] +- Add [aerial.nvim]. +- Add [nvim-ufo]. [LilleAila](https://github.com/LilleAila): @@ -160,7 +160,7 @@ Inspiration from `vim.languages.clang.dap` implementation. - Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`. -[nezia1](https://github.com/nezia1) +[nezia1](https://github.com/nezia1): - Add support for [nixd](https://github.com/nix-community/nixd) language server. @@ -170,30 +170,31 @@ available plugins, under `vim.utility.multicursors`. - Add [hydra.nvim](https://github.com/nvimtools/hydra.nvim) as dependency for `multicursors.nvim` and lazy loads by default. - [folospior](https://github.com/folospior) + +[folospior](https://github.com/folospior): - Fix plugin name for lsp/lspkind. - Move `vim-illuminate` to `setupOpts format` -[iynaix](https://github.com/iynaix) +[iynaix](https://github.com/iynaix): - Add lsp options support for [nixd](https://github.com/nix-community/nixd) language server. -[Mr-Helpful](https://github.com/Mr-Helpful) +[Mr-Helpful](https://github.com/Mr-Helpful): -- Corrects pin names used for nvim themes +- Corrects pin names used for nvim themes. -[Libadoxon](https://github.com/Libadoxon) +[Libadoxon](https://github.com/Libadoxon): - Add [git-conflict](https://github.com/akinsho/git-conflict.nvim) plugin for - resolving git conflicts + resolving git conflicts. - Add formatters for go: [gofmt](https://go.dev/blog/gofmt), [golines](https://github.com/segmentio/golines) and - [gofumpt](https://github.com/mvdan/gofumpt) + [gofumpt](https://github.com/mvdan/gofumpt). -[MaxMur](https://github.com/TheMaxMur) +[MaxMur](https://github.com/TheMaxMur): - Add YAML support under `vim.languages.yaml`. @@ -211,7 +212,7 @@ [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) so blink.cmp can source snippets from it. -[TheColorman](https://github.com/TheColorman) +[TheColorman](https://github.com/TheColorman): - Fix plugin `setupOpts` for `neovim-session-manager` having an invalid value for `autoload_mode`. From 4648c3b28f004dd2799442da798d81ad1e3cf516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Theodor=20Bj=C3=B6rkman?= <38960155+UltraGhostie@users.noreply.github.com> Date: Thu, 6 Mar 2025 15:40:57 +0100 Subject: [PATCH 013/131] utility/harpoon: init --- docs/release-notes/rl-0.8.md | 21 ++++---- modules/plugins/utility/default.nix | 1 + modules/plugins/utility/harpoon/config.nix | 41 ++++++++++++++++ modules/plugins/utility/harpoon/default.nix | 6 +++ modules/plugins/utility/harpoon/harpoon.nix | 53 +++++++++++++++++++++ npins/sources.json | 12 +++++ 6 files changed, 126 insertions(+), 8 deletions(-) create mode 100644 modules/plugins/utility/harpoon/config.nix create mode 100644 modules/plugins/utility/harpoon/default.nix create mode 100644 modules/plugins/utility/harpoon/harpoon.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index cf4dd169..c2e180ea 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -194,6 +194,10 @@ [golines](https://github.com/segmentio/golines) and [gofumpt](https://github.com/mvdan/gofumpt). +[UltraGhostie](https://github.com/UltraGhostie) + +- Add [harpoon](https://github.com/ThePrimeagen/harpoon) plugin for navigation + [MaxMur](https://github.com/TheMaxMur): - Add YAML support under `vim.languages.yaml`. @@ -201,16 +205,17 @@ [alfarel](https://github.com/alfarelcynthesis): - Add missing `yazi.nvim` dependency (`snacks.nvim`). -- Add [mkdir.nvim](https://github.com/jghauser/mkdir.nvim) plugin - for automatic creation of parent directories when editing a nested file. -- Add [nix-develop.nvim](https://github.com/figsoda/nix-develop.nvim) plugin - for in-neovim `nix develop`, `nix shell` and more. -- Add [direnv.vim](https://github.com/direnv/direnv.vim) plugin - for automatic syncing of nvim shell environment with direnv's. + +- Add [mkdir.nvim](https://github.com/jghauser/mkdir.nvim) plugin for automatic + creation of parent directories when editing a nested file. +- Add [nix-develop.nvim](https://github.com/figsoda/nix-develop.nvim) plugin for + in-neovim `nix develop`, `nix shell` and more. +- Add [direnv.vim](https://github.com/direnv/direnv.vim) plugin for automatic + syncing of nvim shell environment with direnv's. - Add [blink.cmp] source options and some default-disabled sources. - Add [blink.cmp] option to add - [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) - so blink.cmp can source snippets from it. + [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) so + blink.cmp can source snippets from it. [TheColorman](https://github.com/TheColorman): diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index 0f0956fb..a1574b97 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -6,6 +6,7 @@ ./direnv ./fzf-lua ./gestures + ./harpoon ./icon-picker ./images ./leetcode-nvim diff --git a/modules/plugins/utility/harpoon/config.nix b/modules/plugins/utility/harpoon/config.nix new file mode 100644 index 00000000..487e67e4 --- /dev/null +++ b/modules/plugins/utility/harpoon/config.nix @@ -0,0 +1,41 @@ +{ + options, + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.binds) pushDownDefault mkKeymap; + + cfg = config.vim.navigation.harpoon; + + keys = cfg.mappings; + inherit (options.vim.navigation.harpoon) mappings; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["plenary-nvim"]; + + lazy.plugins.harpoon = { + package = "harpoon"; + setupModule = "harpoon"; + inherit (cfg) setupOpts; + + cmd = ["Harpoon"]; + + keys = [ + (mkKeymap "n" keys.markFile "lua require('harpoon'):list():add()" {desc = mappings.markFile.description;}) + (mkKeymap "n" keys.listMarks "lua require('harpoon').ui:toggle_quick_menu(require('harpoon'):list())" {desc = mappings.listMarks.description;}) + (mkKeymap "n" keys.file1 "lua require('harpoon'):list():select(1)" {desc = mappings.file1.description;}) + (mkKeymap "n" keys.file2 "lua require('harpoon'):list():select(2)" {desc = mappings.file2.description;}) + (mkKeymap "n" keys.file3 "lua require('harpoon'):list():select(3)" {desc = mappings.file3.description;}) + (mkKeymap "n" keys.file4 "lua require('harpoon'):list():select(4)" {desc = mappings.file4.description;}) + ]; + }; + + binds.whichKey.register = pushDownDefault { + "a" = "Harpoon Mark"; + }; + }; + }; +} diff --git a/modules/plugins/utility/harpoon/default.nix b/modules/plugins/utility/harpoon/default.nix new file mode 100644 index 00000000..21637c5b --- /dev/null +++ b/modules/plugins/utility/harpoon/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./harpoon.nix + ./config.nix + ]; +} diff --git a/modules/plugins/utility/harpoon/harpoon.nix b/modules/plugins/utility/harpoon/harpoon.nix new file mode 100644 index 00000000..4478c938 --- /dev/null +++ b/modules/plugins/utility/harpoon/harpoon.nix @@ -0,0 +1,53 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.types) bool; + inherit (lib.nvim.binds) mkMappingOption; + inherit (lib.nvim.types) mkPluginSetupOption luaInline; + inherit (lib.generators) mkLuaInline; +in { + options.vim.navigation.harpoon = { + mappings = { + markFile = mkMappingOption "Mark file [Harpoon]" "a"; + listMarks = mkMappingOption "List marked files [Harpoon]" ""; + file1 = mkMappingOption "Go to marked file 1 [Harpoon]" ""; + file2 = mkMappingOption "Go to marked file 2 [Harpoon]" ""; + file3 = mkMappingOption "Go to marked file 3 [Harpoon]" ""; + file4 = mkMappingOption "Go to marked file 4 [Harpoon]" ""; + }; + + enable = mkEnableOption "Quick bookmarks on keybinds [Harpoon]"; + + setupOpts = mkPluginSetupOption "Harpoon" { + defaults = { + save_on_toggle = mkOption { + type = bool; + default = false; + description = '' + Any time the ui menu is closed then we will save the + state back to the backing list, not to the fs + ''; + }; + sync_on_ui_close = mkOption { + type = bool; + default = false; + description = '' + Any time the ui menu is closed then the state of the + list will be sync'd back to the fs + ''; + }; + key = mkOption { + type = luaInline; + default = mkLuaInline '' + function() + return vim.loop.cwd() + end + ''; + description = '' + How the out list key is looked up. This can be useful + when using worktrees and using git remote instead of file path + ''; + }; + }; + }; + }; +} diff --git a/npins/sources.json b/npins/sources.json index a68a1ea4..f5e12e4b 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -519,6 +519,18 @@ "url": "https://github.com/ellisonleao/gruvbox.nvim/archive/089b60e92aa0a1c6fa76ff527837cd35b6f5ac81.tar.gz", "hash": "0mr8q2xi4s2anibll8lhxax7q1akyg687bp5r58gckkhi04064q4" }, + "harpoon": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "ThePrimeagen", + "repo": "harpoon" + }, + "branch": "harpoon2", + "revision": "ed1f853847ffd04b2b61c314865665e1dadf22c7", + "url": "https://github.com/ThePrimeagen/harpoon/archive/ed1f853847ffd04b2b61c314865665e1dadf22c7.tar.gz", + "hash": "1dcpdlna2lff9dlsh6i4v16qmn5r9279wdvn0ry3xg4abqwnzc9g" + }, "haskell-tools-nvim": { "type": "Git", "repository": { From 4bf2bc9db602fb7ba6e1651e3812b751d725a967 Mon Sep 17 00:00:00 2001 From: Erwin de Vries <139006912+esdevries@users.noreply.github.com> Date: Thu, 6 Mar 2025 21:53:33 +0100 Subject: [PATCH 014/131] theme/supported-themes: add github-nvim-theme (#688) --- docs/release-notes/rl-0.8.md | 6 ++++++ modules/plugins/statusline/lualine/lualine.nix | 11 +++++++++++ modules/plugins/theme/supported-themes.nix | 16 ++++++++++++++++ npins/sources.json | 14 +++++++++++++- 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index c2e180ea..6b5ed694 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -221,3 +221,9 @@ - Fix plugin `setupOpts` for `neovim-session-manager` having an invalid value for `autoload_mode`. + +[esdevries](https://github.com/esdevries): + +[projekt0n/github-nvim-theme]: https://github.com/projekt0n/github-nvim-theme + +- Add `github-nvim-theme` theme from [projekt0n/github-nvim-theme]. diff --git a/modules/plugins/statusline/lualine/lualine.nix b/modules/plugins/statusline/lualine/lualine.nix index 6e95f03b..9943f78e 100644 --- a/modules/plugins/statusline/lualine/lualine.nix +++ b/modules/plugins/statusline/lualine/lualine.nix @@ -21,6 +21,17 @@ "codedark" "dracula" "everforest" + "github_dark" + "github_light" + "github_dark_dimmed" + "github_dark_default" + "github_light_default" + "github_dark_high_contrast" + "github_light_high_contrast" + "github_dark_colorblind" + "github_light_colorblind" + "github_dark_tritanopia" + "github_light_tritanopia" "gruvbox" "gruvbox_dark" "gruvbox_light" diff --git a/modules/plugins/theme/supported-themes.nix b/modules/plugins/theme/supported-themes.nix index 4029a1c0..0b5cb90b 100644 --- a/modules/plugins/theme/supported-themes.nix +++ b/modules/plugins/theme/supported-themes.nix @@ -195,4 +195,20 @@ in { vim.cmd.colorscheme("nord") ''; }; + github = { + setup = { + style ? "dark", + transparent ? false, + ... + }: '' + require('github-theme').setup({ + options = { + transparent = ${boolToString transparent}, + }, + }) + + vim.cmd[[colorscheme github_${style}]] + ''; + styles = ["dark" "light" "dark_dimmed" "dark_default" "light_default" "dark_high_contrast" "light_high_contrast" "dark_colorblind" "light_colorblind" "dark_tritanopia" "light_tritanopia"]; + }; } diff --git a/npins/sources.json b/npins/sources.json index f5e12e4b..bced2451 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -483,6 +483,18 @@ "url": "https://github.com/akinsho/git-conflict.nvim/archive/a1badcd070d176172940eb55d9d59029dad1c5a6.tar.gz", "hash": "05rnwhm1fmg3yb7j2xc9nmw262jc687qxhwabn97qarrk2da0r0a" }, + "github": { + "type": "Git", + "repository": { + "type": "Github", + "owner": "projekt0n", + "repo": "github-nvim-theme" + }, + "branch": "main", + "revision": "c106c9472154d6b2c74b74565616b877ae8ed31d", + "url": "https://github.com/projekt0n/github-nvim-theme/archive/c106c9472154d6b2c74b74565616b877ae8ed31d.tar.gz", + "hash": "/A4hkKTzjzeoR1SuwwklraAyI8oMkhxrwBBV9xb59PA=" + }, "gitsigns-nvim": { "type": "Git", "repository": { @@ -2194,4 +2206,4 @@ } }, "version": 3 -} \ No newline at end of file +} From 414c92276efd552e0491eca8e20c4a68acfec255 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 7 Mar 2025 13:51:54 +0300 Subject: [PATCH 015/131] pins: fix github-nvim-theme repository type --- npins/sources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npins/sources.json b/npins/sources.json index bced2451..bc149180 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -486,7 +486,7 @@ "github": { "type": "Git", "repository": { - "type": "Github", + "type": "GitHub", "owner": "projekt0n", "repo": "github-nvim-theme" }, From c3b9c979eec7db96a6d4a7f4e84e7492928610cd Mon Sep 17 00:00:00 2001 From: Soliprem <73885403+Soliprem@users.noreply.github.com> Date: Fri, 7 Mar 2025 20:59:28 +0100 Subject: [PATCH 016/131] lsp/otter: fix assertion (#696) * otter: change assert into a warning * otter: update source and warning --- modules/plugins/lsp/otter/config.nix | 13 ++++++------- npins/sources.json | 8 ++++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/modules/plugins/lsp/otter/config.nix b/modules/plugins/lsp/otter/config.nix index c8a2d3c6..b1b045d8 100644 --- a/modules/plugins/lsp/otter/config.nix +++ b/modules/plugins/lsp/otter/config.nix @@ -15,13 +15,12 @@ mappings = addDescriptionsToMappings cfg.otter-nvim.mappings mappingDefinitions; in { config = mkIf (cfg.enable && cfg.otter-nvim.enable) { - assertions = [ - { - assertion = !config.vim.utility.ccc.enable; - message = '' - ccc and otter have a breaking conflict. It's been reported upstream. Until it's fixed, disable one of them - ''; - } + warnings = [ + # TODO: remove warning when we update to nvim 0.11 + (mkIf config.vim.utility.ccc.enable '' + ccc and otter occasionally have small conflicts that will disappear with nvim 0.11. + In the meantime, otter handles it by throwing a warning, but both plugins will work. + '') ]; vim = { startPlugins = ["otter-nvim"]; diff --git a/npins/sources.json b/npins/sources.json index bc149180..daad4177 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1804,9 +1804,9 @@ "repo": "otter.nvim" }, "branch": "main", - "revision": "21f042f4d1a9ff4788634ad76a10033eed13c7f2", - "url": "https://github.com/jmbuhr/otter.nvim/archive/21f042f4d1a9ff4788634ad76a10033eed13c7f2.tar.gz", - "hash": "1gi603ckyxljbhkg8jhwh2pf5kvgb676ykw3sv9gvi0c2s4fb55r" + "revision": "e37053d2c6a17463e705483122eee04d41e3d4af", + "url": "https://github.com/jmbuhr/otter.nvim/archive/e37053d2c6a17463e705483122eee04d41e3d4af.tar.gz", + "hash": "0sq7x2mcxl7z0j4s3a395fy0bzz13h4rxd03lp6674y6hsjxcm55" }, "oxocarbon": { "type": "Git", @@ -2206,4 +2206,4 @@ } }, "version": 3 -} +} \ No newline at end of file From 6576509cd559aec3da271d12fa911d04d44708ec Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 9 Mar 2025 02:37:13 +0300 Subject: [PATCH 017/131] docs: fix typo in project README I should hire someone to proofread my writing... --- .github/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 01395211..7c0974c3 100644 --- a/.github/README.md +++ b/.github/README.md @@ -237,7 +237,7 @@ customizability of plugin inputs, which is one of our primary features. an imperative path (e.g., `~/.config/nvim`) for my Neovim configuration instead of a configuration generated from Nix? -**A**: Yes! Add `"~/.config.nvim"` to `vim.additionalRuntimePaths = [ ... ]` and +**A**: Yes! Add `"~/.config/nvim"` to `vim.additionalRuntimePaths = [ ... ]` and any plugins you want to load to `vim.startPlugins`. This will load your configuration from `~/.config/nvim`. You may still use `vim.*` to modify Neovim's behaviour with Nix. From c8fd6204d02596462e354cf35b029cd6a86ce24b Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 9 Mar 2025 21:55:04 +0300 Subject: [PATCH 018/131] languages/nix: fully deprecate nixpkgs-fmt --- modules/plugins/languages/nix.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/plugins/languages/nix.nix b/modules/plugins/languages/nix.nix index 1ae2693e..54c11af2 100644 --- a/modules/plugins/languages/nix.nix +++ b/modules/plugins/languages/nix.nix @@ -121,8 +121,6 @@ ) ''; }; - - nixpkgs-fmt = null; # removed }; defaultDiagnosticsProvider = ["statix" "deadnix"]; @@ -219,7 +217,6 @@ in { ${concatStringsSep ", " (attrNames formats)} ''; } - { assertion = cfg.lsp.server != "rnix"; message = '' From 9f276a0c5fac8039087b765d0762095ef61694e1 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Date: Mon, 10 Mar 2025 09:43:34 +0100 Subject: [PATCH 019/131] languages/rust: fix unused lsp settings option (#641) Co-authored-by: raf --- modules/plugins/languages/rust.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/plugins/languages/rust.nix b/modules/plugins/languages/rust.nix index 7e9cb627..aea10687 100644 --- a/modules/plugins/languages/rust.nix +++ b/modules/plugins/languages/rust.nix @@ -62,6 +62,15 @@ in { description = "Options to pass to rust analyzer"; type = str; default = ""; + example = '' + ['rust-analyzer'] = { + cargo = {allFeature = true}, + checkOnSave = true, + procMacro = { + enable = true, + }, + }, + ''; }; }; @@ -142,6 +151,9 @@ in { then expToLua cfg.lsp.package else ''{"${cfg.lsp.package}/bin/rust-analyzer"}'' }, + default_settings = { + ${cfg.lsp.opts} + }, on_attach = function(client, bufnr) default_on_attach(client, bufnr) local opts = { noremap=true, silent=true, buffer = bufnr } From dd281b78e50072b7311c0a4480bf94ec026cc20e Mon Sep 17 00:00:00 2001 From: raf Date: Mon, 10 Mar 2025 08:46:07 +0000 Subject: [PATCH 020/131] neovim/init: add API for autocmds and autogroups (#656) --- docs/release-notes/rl-0.8.md | 8 ++ modules/neovim/init/autocmds.nix | 185 +++++++++++++++++++++++++++++++ modules/neovim/init/default.nix | 1 + 3 files changed, 194 insertions(+) create mode 100644 modules/neovim/init/autocmds.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 6b5ed694..bfe21e9b 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -52,6 +52,14 @@ - Add [yazi.nvim] as a companion plugin for Yazi, the terminal file manager. +- Add [](#opt-vim.autocmds) and [](#opt-vim.augroups) to allow declaring + autocommands via Nix. + +- Fix plugin `setupOpts` for yanky.nvim and assert if shada is configured as a + backend while shada is disabled in Neovim options. + +- Add [yazi.nvim] as a companion plugin for Yazi, the terminal file manager. + [amadaluzia](https://github.com/amadaluzia): [haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim diff --git a/modules/neovim/init/autocmds.nix b/modules/neovim/init/autocmds.nix new file mode 100644 index 00000000..5da7bc55 --- /dev/null +++ b/modules/neovim/init/autocmds.nix @@ -0,0 +1,185 @@ +{ + config, + lib, + ... +}: let + inherit (lib.options) mkOption mkEnableOption literalExpression; + inherit (lib.lists) filter; + inherit (lib.strings) optionalString; + inherit (lib.types) nullOr submodule listOf str bool; + inherit (lib.nvim.types) luaInline; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.dag) entryAfter; + + autocommandType = submodule { + options = { + enable = + mkEnableOption "" + // { + default = true; + description = "Whether to enable this autocommand"; + }; + + event = mkOption { + type = nullOr (listOf str); + default = null; + example = ["BufRead" "BufWritePre"]; + description = "The event(s) that trigger the autocommand."; + }; + + pattern = mkOption { + type = nullOr (listOf str); + default = null; + example = ["*.lua" "*.vim"]; + description = "The file pattern(s) that determine when the autocommand applies)."; + }; + + callback = mkOption { + type = nullOr luaInline; + default = null; + example = literalExpression '' + mkLuaInline ''' + function() + print("Saving a Lua file...") + end + '''' + ''; + description = "The file pattern(s) that determine when the autocommand applies."; + }; + + command = mkOption { + type = nullOr str; + default = null; + description = "Vim command string instead of a Lua function."; + }; + + group = mkOption { + type = nullOr str; + default = null; + example = "MyAutoCmdGroup"; + description = "An optional autocommand group to manage related autocommands."; + }; + + desc = mkOption { + type = nullOr str; + default = null; + example = "Notify when saving a Lua file"; + description = "A description for the autocommand."; + }; + + once = mkOption { + type = bool; + default = false; + description = "Whether autocommand run only once."; + }; + + nested = mkOption { + type = bool; + default = false; + description = "Whether to allow nested autocommands to trigger."; + }; + }; + }; + + autogroupType = submodule { + options = { + enable = + mkEnableOption "" + // { + default = true; + description = "Whether to enable this autogroup"; + }; + + name = mkOption { + type = str; + example = "MyAutoCmdGroup"; + description = "The name of the autocommand group."; + }; + + clear = mkOption { + type = bool; + default = true; + description = '' + Whether to clear existing autocommands in this group before defining new ones. + This helps avoid duplicate autocommands. + ''; + }; + }; + }; + + cfg = config.vim; +in { + options.vim = { + augroups = mkOption { + type = listOf autogroupType; + default = []; + description = '' + A list of Neovim autogroups, which are used to organize and manage related + autocommands together. Groups allow multiple autocommands to be cleared + or redefined collectively, preventing duplicate definitions. + + Each autogroup consists of a name, a boolean indicating whether to clear + existing autocommands, and a list of associated autocommands. + ''; + }; + + autocmds = mkOption { + type = listOf autocommandType; + default = []; + description = '' + A list of Neovim autocommands to be registered. + + Each entry defines an autocommand, specifying events, patterns, optional + callbacks, commands, groups, and execution settings. + ''; + }; + }; + + config = { + vim = let + enabledAutocommands = filter (cmd: cmd.enable) cfg.autocmds; + enabledAutogroups = filter (au: au.enable) cfg.augroups; + in { + luaConfigRC = { + augroups = entryAfter ["pluginConfigs"] (optionalString (enabledAutogroups != []) '' + local nvf_autogroups = {} + for _, group in ipairs(${toLuaObject enabledAutogroups}) do + if group.name then + nvf_autogroups[group.name] = { clear = group.clear } + end + end + + for group_name, options in pairs(nvf_autogroups) do + vim.api.nvim_create_augroup(group_name, options) + end + ''); + + autocmds = entryAfter ["pluginConfigs"] (optionalString (enabledAutocommands != []) '' + local nvf_autocommands = ${toLuaObject enabledAutocommands} + for _, autocmd in ipairs(nvf_autocommands) do + vim.api.nvim_create_autocmd( + autocmd.event, + { + group = autocmd.group, + pattern = autocmd.pattern, + buffer = autocmd.buffer, + desc = autocmd.desc, + callback = autocmd.callback, + command = autocmd.command, + once = autocmd.once, + nested = autocmd.nested + } + ) + end + ''); + }; + }; + + assertions = [ + { + assertion = builtins.all (cmd: (cmd.command == null || cmd.callback == null)) cfg.autocmds; + message = "An autocommand cannot have both 'command' and 'callback' defined at the same time."; + } + ]; + }; +} diff --git a/modules/neovim/init/default.nix b/modules/neovim/init/default.nix index b0c7e0ce..ac9d29e5 100644 --- a/modules/neovim/init/default.nix +++ b/modules/neovim/init/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./autocmds.nix ./basic.nix ./debug.nix ./highlight.nix From 3c52dbfd72bc1ef3c72e5910ab2737a6b012ca50 Mon Sep 17 00:00:00 2001 From: Nikita <68944906+BANanaD3V@users.noreply.github.com> Date: Mon, 10 Mar 2025 11:56:50 +0300 Subject: [PATCH 021/131] dashboard/alpha: configure with nix (#699) Co-authored-by: raf --- .github/typos.toml | 2 +- docs/release-notes/rl-0.8.md | 6 + modules/plugins/dashboard/alpha/alpha.nix | 20 +- modules/plugins/dashboard/alpha/config.nix | 228 +++------------------ 4 files changed, 52 insertions(+), 204 deletions(-) diff --git a/.github/typos.toml b/.github/typos.toml index 2ea46a8c..e2c0d59d 100644 --- a/.github/typos.toml +++ b/.github/typos.toml @@ -1,5 +1,5 @@ -default.extend-ignore-words-re = ["(?i)(noice)", "befores", "annote", "viw"] +default.extend-ignore-words-re = ["(?i)(noice)", "befores", "annote", "viw", "BANanaD3V"] files.extend-exclude = [ "npins/sources.json" ] diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index bfe21e9b..1a5b7e4c 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -5,6 +5,8 @@ - `git-conflict` keybinds are now prefixed with `` to avoid conflicting with builtins. +- `alpha` is now configured with nix, default config removed. + [NotAShelf](https://github.com/notashelf): [typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim @@ -235,3 +237,7 @@ [projekt0n/github-nvim-theme]: https://github.com/projekt0n/github-nvim-theme - Add `github-nvim-theme` theme from [projekt0n/github-nvim-theme]. + +[BANanaD3V](https://github.com/BANanaD3V): + +- `alpha` is now configured with nix. diff --git a/modules/plugins/dashboard/alpha/alpha.nix b/modules/plugins/dashboard/alpha/alpha.nix index d5329cc7..90d02f30 100644 --- a/modules/plugins/dashboard/alpha/alpha.nix +++ b/modules/plugins/dashboard/alpha/alpha.nix @@ -1,7 +1,23 @@ {lib, ...}: let - inherit (lib.options) mkEnableOption; + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.types) listOf attrsOf anything nullOr enum; in { options.vim.dashboard.alpha = { - enable = mkEnableOption "fast and fully programmable greeter for neovim [alpha.mvim]"; + enable = mkEnableOption "fast and fully programmable greeter for neovim [alpha.nvim]"; + theme = mkOption { + type = nullOr (enum ["dashboard" "startify" "theta"]); + default = "dashboard"; + description = "Alpha default theme to use"; + }; + layout = mkOption { + type = listOf (attrsOf anything); + default = []; + description = "Alpha dashboard layout"; + }; + opts = mkOption { + type = attrsOf anything; + default = {}; + description = "Optional global options"; + }; }; } diff --git a/modules/plugins/dashboard/alpha/config.nix b/modules/plugins/dashboard/alpha/config.nix index bb648a50..804189b9 100644 --- a/modules/plugins/dashboard/alpha/config.nix +++ b/modules/plugins/dashboard/alpha/config.nix @@ -5,8 +5,11 @@ }: let inherit (lib.modules) mkIf; inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.dashboard.alpha; + themeDefined = cfg.theme != null; + layoutDefined = cfg.layout != []; in { config = mkIf cfg.enable { vim.startPlugins = [ @@ -14,207 +17,30 @@ in { "nvim-web-devicons" ]; - # the entire credit for this dashboard configuration to https://github.com/Rishabh672003 - # honestly, excellent work - vim.pluginRC.alpha = entryAnywhere '' - local alpha = require("alpha") - local plenary_path = require("plenary.path") - local dashboard = require("alpha.themes.dashboard") - local cdir = vim.fn.getcwd() - local if_nil = vim.F.if_nil - - local nvim_web_devicons = { - enabled = true, - highlight = true, - } - - local function get_extension(fn) - local match = fn:match("^.+(%..+)$") - local ext = "" - if match ~= nil then - ext = match:sub(2) - end - return ext - end - - local function icon(fn) - local nwd = require("nvim-web-devicons") - local ext = get_extension(fn) - return nwd.get_icon(fn, ext, { default = true }) - end - - local function file_button(fn, sc, short_fn) - short_fn = short_fn or fn - local ico_txt - local fb_hl = {} - - if nvim_web_devicons.enabled then - local ico, hl = icon(fn) - local hl_option_type = type(nvim_web_devicons.highlight) - if hl_option_type == "boolean" then - if hl and nvim_web_devicons.highlight then - table.insert(fb_hl, { hl, 0, 3 }) - end - end - if hl_option_type == "string" then - table.insert(fb_hl, { nvim_web_devicons.highlight, 0, 3 }) - end - ico_txt = ico .. " " - else - ico_txt = "" - end - local file_button_el = dashboard.button(sc, ico_txt .. short_fn, "e " .. fn .. " ") - local fn_start = short_fn:match(".*[/\\]") - if fn_start ~= nil then - table.insert(fb_hl, { "Comment", #ico_txt - 2, #fn_start + #ico_txt }) - end - file_button_el.opts.hl = fb_hl - return file_button_el - end - - local default_mru_ignore = { "gitcommit" } - - local mru_opts = { - ignore = function(path, ext) - return (string.find(path, "COMMIT_EDITMSG")) or (vim.tbl_contains(default_mru_ignore, ext)) - end, - } - - --- @param start number - --- @param cwd string optional - --- @param items_number number optional number of items to generate, default = 10 - local function mru(start, cwd, items_number, opts) - opts = opts or mru_opts - items_number = if_nil(items_number, 15) - - local oldfiles = {} - for _, v in pairs(vim.v.oldfiles) do - if #oldfiles == items_number then - break - end - local cwd_cond - if not cwd then - cwd_cond = true - else - cwd_cond = vim.startswith(v, cwd) - end - local ignore = (opts.ignore and opts.ignore(v, get_extension(v))) or false - if (vim.fn.filereadable(v) == 1) and cwd_cond and not ignore then - oldfiles[#oldfiles + 1] = v - end - end - local target_width = 35 - - local tbl = {} - for i, fn in ipairs(oldfiles) do - local short_fn - if cwd then - short_fn = vim.fn.fnamemodify(fn, ":.") - else - short_fn = vim.fn.fnamemodify(fn, ":~") - end - - if #short_fn > target_width then - short_fn = plenary_path.new(short_fn):shorten(1, { -2, -1 }) - if #short_fn > target_width then - short_fn = plenary_path.new(short_fn):shorten(1, { -1 }) - end - end - - local shortcut = tostring(i + start - 1) - - local file_button_el = file_button(fn, shortcut, short_fn) - tbl[i] = file_button_el - end - return { - type = "group", - val = tbl, - opts = {}, - } - end - - local default_header = { - type = "text", - val = { - - [[███ ██ ███████ ██████ ██ ██ ██ ███ ███]], - [[████ ██ ██ ██ ██ ██ ██ ██ ████ ████]], - [[██ ██ ██ █████ ██ ██ ██ ██ ██ ██ ████ ██]], - [[██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██]], - [[██ ████ ███████ ██████ ████ ██ ██ ██]], - - -- [[ __ ]], - -- [[ ___ ___ ___ __ __ /\_\ ___ ___ ]], - -- [[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]], - -- [[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]], - -- [[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]], - -- [[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]], - }, - opts = { - position = "center", - hl = "Type", - -- wrap = "overflow"; - }, - } - - local section_mru = { - type = "group", - val = { - { - type = "text", - val = "Recent files", - opts = { - hl = "SpecialComment", - shrink_margin = false, - position = "center", - }, - }, - { type = "padding", val = 1 }, - { - type = "group", - val = function() - return { mru(0, cdir) } - end, - opts = { shrink_margin = false }, - }, - }, - } - - local buttons = { - type = "group", - val = { - { type = "text", val = "Quick links", opts = { hl = "SpecialComment", position = "center" } }, - { type = "padding", val = 1 }, - -- TODO: buttons should be added based on whether or not the relevant plugin is available - dashboard.button("e", " New file", "ene"), -- available all the time - dashboard.button("SPC F", "󰈞 Find file"), -- telescope - dashboard.button("SPC ff", "󰊄 Live grep"), -- telescope - dashboard.button("SPC p", " Projects"), -- any project - dashboard.button("q", "󰅚 Quit", "qa"), -- available all the time - }, - position = "center", - } - - local config = { - layout = { - { type = "padding", val = 2 }, - default_header, - { type = "padding", val = 2 }, - section_mru, - { type = "padding", val = 2 }, - buttons, - }, - opts = { - margin = 5, - setup = function() - vim.cmd([[ - autocmd alpha_temp DirChanged * lua require('alpha').redraw() - ]]) - end, - }, - } - - alpha.setup(config) + vim.pluginRC.alpha = let + setupOpts = + if themeDefined + then lib.generators.mkLuaInline "require'alpha.themes.${cfg.theme}'.config" + else { + inherit (cfg) layout opts; + }; + in '' + require('alpha').setup(${toLuaObject setupOpts}) ''; + + assertions = [ + { + assertion = themeDefined || layoutDefined; + message = '' + One of 'theme' or 'layout' should be defined in Alpha configuration. + ''; + } + { + assertion = !(themeDefined && layoutDefined); + message = '' + 'theme' and 'layout' cannot be defined at the same time. + ''; + } + ]; }; } From 28b48565f024a20a44bee850f6819d1e5b3972ec Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 10 Mar 2025 12:03:48 +0300 Subject: [PATCH 022/131] ci: update typos config --- .editorconfig | 2 +- .github/typos.toml | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index 2f767ae8..c7fdc76d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,7 +14,7 @@ indent_style = space indent_size = 2 trim_trailing_whitespace = false -[*.{js,json,nix,yml,yaml}] +[*.{js,json,nix,yml,yaml,toml}] indent_style = space indent_size = 2 tab_width = 2 diff --git a/.github/typos.toml b/.github/typos.toml index e2c0d59d..2cd18dde 100644 --- a/.github/typos.toml +++ b/.github/typos.toml @@ -1,5 +1,10 @@ -default.extend-ignore-words-re = ["(?i)(noice)", "befores", "annote", "viw", "BANanaD3V"] -files.extend-exclude = [ -"npins/sources.json" +files.extend-exclude = ["npins/sources.json"] +default.extend-ignore-words-re = [ + "(?i)(noice)", + "befores", + "annote", + "viw", + "BA", # somehow "BANanaD3V" is valid, but BA is not... ] + From 2f02c47c1b5895b97295aacd454fad6eb1822598 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 21:37:32 +0000 Subject: [PATCH 023/131] ci: bump cachix/cachix-action from 15 to 16 (#703) Bumps [cachix/cachix-action](https://github.com/cachix/cachix-action) from 15 to 16. - [Release notes](https://github.com/cachix/cachix-action/releases) - [Commits](https://github.com/cachix/cachix-action/compare/v15...v16) --- updated-dependencies: - dependency-name: cachix/cachix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cachix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cachix.yml b/.github/workflows/cachix.yml index cac8ee51..959a04b6 100644 --- a/.github/workflows/cachix.yml +++ b/.github/workflows/cachix.yml @@ -36,7 +36,7 @@ jobs: - name: Install Nix uses: DeterminateSystems/nix-installer-action@main - - uses: cachix/cachix-action@v15 + - uses: cachix/cachix-action@v16 with: authToken: ${{ secrets.CACHIX_TOKEN }} extraPullNames: nix-community From bafa6cbf84970e03c40e22e80fff32f077ef741c Mon Sep 17 00:00:00 2001 From: Thales Menato <8753631+thamenato@users.noreply.github.com> Date: Tue, 11 Mar 2025 06:33:39 -0400 Subject: [PATCH 024/131] languages/cue: initial CUE language support (#704) * feat: add cue language support * docs: add changelog information --- docs/release-notes/rl-0.8.md | 2 ++ modules/plugins/languages/cue.nix | 51 +++++++++++++++++++++++++++ modules/plugins/languages/default.nix | 1 + 3 files changed, 54 insertions(+) create mode 100644 modules/plugins/languages/cue.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 1a5b7e4c..1acc855e 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -159,8 +159,10 @@ [thamenato](https://github.com/thamenato): [ruff]: (https://github.com/astral-sh/ruff) +[cue]: (https://cuelang.org/) - Add [ruff] as a formatter option in `vim.languages.python.format.type`. +- Add [cue] support under `vim.languages.cue`. [ARCIII](https://github.com/ArmandoCIII): diff --git a/modules/plugins/languages/cue.nix b/modules/plugins/languages/cue.nix new file mode 100644 index 00000000..313e3233 --- /dev/null +++ b/modules/plugins/languages/cue.nix @@ -0,0 +1,51 @@ +{ + pkgs, + config, + lib, + ... +}: let + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.types) package; + inherit (lib.nvim.types) mkGrammarOption; + + cfg = config.vim.languages.cue; +in { + options.vim.languages.cue = { + enable = mkEnableOption "CUE language support"; + + treesitter = { + enable = mkEnableOption "CUE treesitter" // {default = config.vim.languages.enableTreesitter;}; + + package = mkGrammarOption pkgs "cue"; + }; + + lsp = { + enable = mkEnableOption "CUE LSP support" // {default = config.vim.languages.enableLSP;}; + + package = mkOption { + type = package; + default = pkgs.cue; + description = "cue lsp implementation"; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + (mkIf cfg.treesitter.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [cfg.treesitter.package]; + }) + + (mkIf cfg.lsp.enable { + vim.lsp.lspconfig.enable = true; + vim.lsp.lspconfig.sources.cue-lsp = '' + lspconfig.cue.setup { + capabilities = capabilities, + on_attach = default_on_attach, + cmd = {"${cfg.lsp.package}/bin/cue", "lsp"}, + } + ''; + }) + ]); +} diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index 08d676b9..d452ef56 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -5,6 +5,7 @@ in { ./asm.nix ./astro.nix ./bash.nix + ./cue.nix ./dart.nix ./clang.nix ./css.nix From 06250248696fa5c44e11a89a5647d12570fc0851 Mon Sep 17 00:00:00 2001 From: "Adam M. Szalkowski" Date: Thu, 13 Mar 2025 00:21:13 +0100 Subject: [PATCH 025/131] languages/helm: init (#679) --- docs/release-notes/rl-0.8.md | 4 ++ modules/plugins/languages/default.nix | 1 + modules/plugins/languages/helm.nix | 89 +++++++++++++++++++++++++++ modules/plugins/languages/yaml.nix | 17 ++++- 4 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 modules/plugins/languages/helm.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 1acc855e..ee579d3e 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -243,3 +243,7 @@ [BANanaD3V](https://github.com/BANanaD3V): - `alpha` is now configured with nix. + +[Butzist](https://github.com/butzist) + +- Add Helm chart support under `vim.languages.helm`. diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index d452ef56..20acfb6c 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -13,6 +13,7 @@ in { ./gleam.nix ./go.nix ./hcl.nix + ./helm.nix ./kotlin.nix ./html.nix ./haskell.nix diff --git a/modules/plugins/languages/helm.nix b/modules/plugins/languages/helm.nix new file mode 100644 index 00000000..d3fd636e --- /dev/null +++ b/modules/plugins/languages/helm.nix @@ -0,0 +1,89 @@ +{ + pkgs, + config, + lib, + ... +}: let + inherit (builtins) attrNames; + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.lists) isList; + inherit (lib.types) enum either listOf package str; + inherit (lib.nvim.types) mkGrammarOption; + inherit (lib.nvim.lua) expToLua; + + cfg = config.vim.languages.helm; + yamlCfg = config.vim.languages.yaml; + + helmCmd = + if isList cfg.lsp.package + then cfg.lsp.package + else ["${cfg.lsp.package}/bin/helm_ls" "serve"]; + yamlCmd = + if isList yamlCfg.lsp.package + then builtins.elemAt yamlCfg.lsp.package 0 + else "${yamlCfg.lsp.package}/bin/yaml-language-server"; + + defaultServer = "helm-ls"; + servers = { + helm-ls = { + package = pkgs.helm-ls; + lspConfig = '' + lspconfig.helm_ls.setup { + capabilities = capabilities, + on_attach = default_on_attach, + cmd = ${expToLua helmCmd}, + settings = { + ['helm-ls'] = { + yamlls = { + path = "${yamlCmd}" + } + } + } + } + ''; + }; + }; +in { + options.vim.languages.helm = { + enable = mkEnableOption "Helm language support"; + + treesitter = { + enable = mkEnableOption "Helm treesitter" // {default = config.vim.languages.enableTreesitter;}; + package = mkGrammarOption pkgs "helm"; + }; + + lsp = { + enable = mkEnableOption "Helm LSP support" // {default = config.vim.languages.enableLSP;}; + + server = mkOption { + description = "Helm LSP server to use"; + type = enum (attrNames servers); + default = defaultServer; + }; + + package = mkOption { + description = "Helm LSP server package"; + type = either package (listOf str); + default = servers.${cfg.lsp.server}.package; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + (mkIf cfg.treesitter.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [cfg.treesitter.package]; + }) + + (mkIf cfg.lsp.enable { + vim.lsp.lspconfig.enable = true; + vim.lsp.lspconfig.sources.helm-lsp = servers.${cfg.lsp.server}.lspConfig; + }) + + { + # Enables filetype detection + vim.startPlugins = [pkgs.vimPlugins.vim-helm]; + } + ]); +} diff --git a/modules/plugins/languages/yaml.nix b/modules/plugins/languages/yaml.nix index ef17b964..c84b17cd 100644 --- a/modules/plugins/languages/yaml.nix +++ b/modules/plugins/languages/yaml.nix @@ -14,14 +14,27 @@ cfg = config.vim.languages.yaml; + onAttach = + if config.vim.languages.helm.lsp.enable + then '' + on_attach = function(client, bufnr) + local filetype = vim.bo[bufnr].filetype + if filetype == "helm" then + client.stop() + end + end'' + else "on_attach = default_on_attach"; + defaultServer = "yaml-language-server"; servers = { yaml-language-server = { package = pkgs.nodePackages.yaml-language-server; lspConfig = '' + + lspconfig.yamlls.setup { - capabilities = capabilities; - on_attach = default_on_attach; + capabilities = capabilities, + ${onAttach}, cmd = ${ if isList cfg.lsp.package then expToLua cfg.lsp.package From 54311277fc5c3ed22850f804c25cd9c406d75646 Mon Sep 17 00:00:00 2001 From: Victor R <39545521+viicslen@users.noreply.github.com> Date: Fri, 14 Mar 2025 01:42:50 +0000 Subject: [PATCH 026/131] language/php: add initial support for intelephense php lsp (#709) * language/php: add initial support for intelephense php lsp * docs: update release notes --------- Co-authored-by: raf --- docs/release-notes/rl-0.8.md | 7 ++++++- modules/plugins/languages/php.nix | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index ee579d3e..bd52df0d 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -244,6 +244,11 @@ - `alpha` is now configured with nix. -[Butzist](https://github.com/butzist) +[viicslen](https://github.com/viicslen): + +- Add `intelephense` language server support under + `vim.languages.php.lsp.server` + +[Butzist](https://github.com/butzist): - Add Helm chart support under `vim.languages.helm`. diff --git a/modules/plugins/languages/php.nix b/modules/plugins/languages/php.nix index d921b11d..4dccc8cd 100644 --- a/modules/plugins/languages/php.nix +++ b/modules/plugins/languages/php.nix @@ -64,6 +64,26 @@ } ''; }; + + intelephense = { + package = pkgs.intelephense; + lspConfig = '' + lspconfig.intelephense.setup{ + capabilities = capabilities, + on_attach = default_on_attach, + cmd = ${ + if isList cfg.lsp.package + then expToLua cfg.lsp.package + else '' + { + "${getExe cfg.lsp.package}", + "--stdio" + }, + '' + } + } + ''; + }; }; in { options.vim.languages.php = { From 2d5ff939b0a55f0a143927fb52f3ff386077c22b Mon Sep 17 00:00:00 2001 From: ARCIII <88923299+ArmandoCIII@users.noreply.github.com> Date: Sat, 15 Mar 2025 09:44:33 -0400 Subject: [PATCH 027/131] assistant/codecompanion-nvim: init (#707) * assistant/codecompanion-nvim: init * assistant/codecompanion-nvim: PR review revisions --------- Co-authored-by: raf --- configuration.nix | 1 + docs/release-notes/rl-0.8.md | 2 + .../codecompanion/codecompanion-nvim.nix | 278 ++++++++++++++++++ .../assistant/codecompanion/config.nix | 27 ++ .../assistant/codecompanion/default.nix | 6 + modules/plugins/assistant/default.nix | 1 + npins/sources.json | 12 + 7 files changed, 327 insertions(+) create mode 100644 modules/plugins/assistant/codecompanion/codecompanion-nvim.nix create mode 100644 modules/plugins/assistant/codecompanion/config.nix create mode 100644 modules/plugins/assistant/codecompanion/default.nix diff --git a/configuration.nix b/configuration.nix index 692337db..a243c970 100644 --- a/configuration.nix +++ b/configuration.nix @@ -234,6 +234,7 @@ isMaximal: { enable = false; cmp.enable = isMaximal; }; + codecompanion-nvim.enable = false; }; session = { diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index bd52df0d..9f05f60a 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -167,10 +167,12 @@ [ARCIII](https://github.com/ArmandoCIII): [leetcode.nvim]: https://github.com/kawre/leetcode.nvim +[codecompanion-nvim]: https://github.com/olimorris/codecompanion.nvim - Add `vim.languages.zig.dap` support through pkgs.lldb dap adapter. Code Inspiration from `vim.languages.clang.dap` implementation. - Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`. +- Add [codecompanion.nvim] plugin under `vim.assistant.codecompanion-nvim`. [nezia1](https://github.com/nezia1): diff --git a/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix new file mode 100644 index 00000000..9ebe30c0 --- /dev/null +++ b/modules/plugins/assistant/codecompanion/codecompanion-nvim.nix @@ -0,0 +1,278 @@ +{lib, ...}: let + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.types) int str enum nullOr attrs; + inherit (lib.nvim.types) mkPluginSetupOption luaInline; +in { + options.vim.assistant = { + codecompanion-nvim = { + enable = mkEnableOption "complementary neovim plugin for codecompanion.nvim"; + + setupOpts = mkPluginSetupOption "codecompanion-nvim" { + opts = { + send_code = mkEnableOption "code from being sent to the LLM."; + + log_level = mkOption { + type = enum ["DEBUG" "INFO" "ERROR" "TRACE"]; + default = "ERROR"; + description = "Change the level of logging."; + }; + + language = mkOption { + type = str; + default = "English"; + description = "Specify which language an LLM should respond in."; + }; + }; + + display = { + diff = { + enabled = + mkEnableOption "" + // { + default = true; + description = "a diff view to see the changes made by the LLM."; + }; + + close_chat_at = mkOption { + type = int; + default = 240; + description = '' + Close an open chat buffer if the + total columns of your display are less than... + ''; + }; + + layout = mkOption { + type = enum ["vertical" "horizontal"]; + default = "vertical"; + description = "Type of split for default provider."; + }; + + provider = mkOption { + type = enum ["default" "mini_diff"]; + default = "default"; + description = "The preferred kind of provider."; + }; + }; + + inline = { + layout = mkOption { + type = enum ["vertical" "horizontal" "buffer"]; + default = "vertical"; + description = "Customize how output is created in new buffer."; + }; + }; + + chat = { + auto_scroll = mkEnableOption "automatic page scrolling."; + + show_settings = mkEnableOption '' + LLM settings to appear at the top of the chat buffer. + ''; + + start_in_insert_mode = mkEnableOption '' + opening the chat buffer in insert mode. + ''; + + show_header_separator = mkEnableOption '' + header separators in the chat buffer. + + Set this to false if you're using an + external markdown formatting plugin. + ''; + + show_references = + mkEnableOption "" + // { + default = true; + description = "references in the chat buffer."; + }; + + show_token_count = + mkEnableOption "" + // { + default = true; + description = "the token count for each response."; + }; + + intro_message = mkOption { + type = str; + default = "Welcome to CodeCompanion ✨! Press ? for options."; + description = "Message to appear in chat buffer."; + }; + + separator = mkOption { + type = str; + default = "─"; + description = '' + The separator between the + different messages in the chat buffer. + ''; + }; + + icons = { + pinned_buffer = mkOption { + type = str; + default = " "; + description = "The icon to represent a pinned buffer."; + }; + + watched_buffer = mkOption { + type = str; + default = "👀 "; + description = "The icon to represent a watched buffer."; + }; + }; + }; + + action_palette = { + width = mkOption { + type = int; + default = 95; + description = "Width of the action palette."; + }; + + height = mkOption { + type = int; + default = 10; + description = "Height of the action palette."; + }; + + prompt = mkOption { + type = str; + default = "Prompt "; + description = "Prompt used for interactive LLM calls."; + }; + + provider = mkOption { + type = enum ["default" "telescope" "mini_pick"]; + default = "default"; + description = "Provider used for the action palette."; + }; + + opts = { + show_default_actions = + mkEnableOption "" + // { + default = true; + description = "showing default actions in the action palette."; + }; + + show_default_prompt_library = + mkEnableOption "" + // { + default = true; + description = '' + showing default prompt library in the action palette. + ''; + }; + }; + }; + }; + + adapters = mkOption { + type = nullOr luaInline; + default = null; + description = "An adapter is what connects Neovim to an LLM."; + }; + + strategies = { + chat = { + adapter = mkOption { + type = nullOr str; + default = null; + description = "Adapter used for the chat strategy."; + }; + + keymaps = mkOption { + type = nullOr attrs; + default = null; + description = "Define or override the default keymaps."; + }; + + variables = mkOption { + type = nullOr luaInline; + default = null; + description = '' + Define your own variables + to share specific content. + ''; + }; + + slash_commands = mkOption { + type = nullOr luaInline; + default = null; + description = '' + Slash Commands (invoked with /) let you dynamically + insert context into the chat buffer, + such as file contents or date/time. + ''; + }; + + tools = mkOption { + type = nullOr attrs; + default = null; + description = '' + Configure tools to perform specific + tasks when invoked by an LLM. + ''; + }; + + roles = mkOption { + type = nullOr luaInline; + default = null; + description = '' + The chat buffer places user and LLM responses under a H2 header. + These can be customized in the configuration. + ''; + }; + }; + + inline = { + adapter = mkOption { + type = nullOr str; + default = null; + description = "Adapter used for the inline strategy."; + }; + + variables = mkOption { + type = nullOr luaInline; + default = null; + description = '' + Define your own variables + to share specific content. + ''; + }; + + keymaps = { + accept_change = { + n = mkOption { + type = str; + default = "ga"; + description = "Accept the suggested change."; + }; + }; + + reject_change = { + n = mkOption { + type = str; + default = "gr"; + description = "Reject the suggested change."; + }; + }; + }; + }; + }; + + prompt_library = mkOption { + type = nullOr attrs; + default = null; + description = '' + A prompt library is a collection of prompts + that can be used in the action palette. + ''; + }; + }; + }; + }; +} diff --git a/modules/plugins/assistant/codecompanion/config.nix b/modules/plugins/assistant/codecompanion/config.nix new file mode 100644 index 00000000..6b427d28 --- /dev/null +++ b/modules/plugins/assistant/codecompanion/config.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + + cfg = config.vim.assistant.codecompanion-nvim; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = [ + "plenary-nvim" + ]; + + lazy.plugins = { + codecompanion-nvim = { + package = "codecompanion-nvim"; + setupModule = "codecompanion"; + inherit (cfg) setupOpts; + }; + }; + + treesitter.enable = true; + }; + }; +} diff --git a/modules/plugins/assistant/codecompanion/default.nix b/modules/plugins/assistant/codecompanion/default.nix new file mode 100644 index 00000000..7f7b4452 --- /dev/null +++ b/modules/plugins/assistant/codecompanion/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./codecompanion-nvim.nix + ]; +} diff --git a/modules/plugins/assistant/default.nix b/modules/plugins/assistant/default.nix index 5b5cf323..697d54f6 100644 --- a/modules/plugins/assistant/default.nix +++ b/modules/plugins/assistant/default.nix @@ -2,5 +2,6 @@ imports = [ ./chatgpt ./copilot + ./codecompanion ]; } diff --git a/npins/sources.json b/npins/sources.json index daad4177..a1d5d19c 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -243,6 +243,18 @@ "url": "https://github.com/ray-x/cmp-treesitter/archive/958fcfa0d8ce46d215e19cc3992c542f576c4123.tar.gz", "hash": "05as01c2f7i20zkzpqbq9n8ji9bcwd678ixmxnrz9vmz5zsj8q7i" }, + "codecompanion-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "olimorris", + "repo": "codecompanion.nvim" + }, + "branch": "main", + "revision": "dd81bd9176daba9ea507cd0457f662c0a15c001f", + "url": "https://github.com/olimorris/codecompanion.nvim/archive/dd81bd9176daba9ea507cd0457f662c0a15c001f.tar.gz", + "hash": "09a20q1hshp07nf9n8w4cxpa8s32vwyd4ya0gdnx5jp7g00dksrg" + }, "codewindow-nvim": { "type": "Git", "repository": { From b3d59642370ba52e61e6db65d1b85937e2d6f210 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 16 Mar 2025 19:31:25 +0300 Subject: [PATCH 028/131] pins: bump all plugins --- npins/sources.json | 346 ++++++++++++++++++++++----------------------- 1 file changed, 173 insertions(+), 173 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index a1d5d19c..54256514 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -8,9 +8,9 @@ "repo": "aerial.nvim" }, "branch": "master", - "revision": "3284a2cb858ba009c79da87d5e010ccee3c99c4d", - "url": "https://github.com/stevearc/aerial.nvim/archive/3284a2cb858ba009c79da87d5e010ccee3c99c4d.tar.gz", - "hash": "0fsvd6ndkp3r8lzpyshqshapna5sh37nz6qabznpwpwax42ghakp" + "revision": "2204cf08791449a6a2fd2ef187a29112eeefd989", + "url": "https://github.com/stevearc/aerial.nvim/archive/2204cf08791449a6a2fd2ef187a29112eeefd989.tar.gz", + "hash": "1482md9kzyrr7mjkca3nnyqgy64q8clhi6xbvgql8qjw7ifz51mx" }, "alpha-nvim": { "type": "Git", @@ -46,10 +46,10 @@ "pre_releases": false, "version_upper_bound": null, "release_prefix": null, - "version": "v0.12.4", - "revision": "a5625f1b14fb5c44b0f9256f5ec0714817f5e355", - "url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v0.12.4", - "hash": "0jdifjifxjqa8r80wlqgkn5rm48wziap92340xz228nrgd0c9g69" + "version": "v0.13.1", + "revision": "29861baf37bbb16f5dbf524a6edac5daaad6f4fc", + "url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v0.13.1", + "hash": "1y5p7i6g884r65mhfsazx28g0qs37hc57jm37i7kch9kcf8m7sbq" }, "blink-cmp-spell": { "type": "Git", @@ -59,9 +59,9 @@ "repo": "blink-cmp-spell" }, "branch": "master", - "revision": "38d6797dea6f72baa6e8b3bfca6da96d8fcac64d", - "url": "https://github.com/ribru17/blink-cmp-spell/archive/38d6797dea6f72baa6e8b3bfca6da96d8fcac64d.tar.gz", - "hash": "19pnasa446iiapgsr3z2fpk0nnrzh8g5wrzrq8n0y4q0z6spc9f6" + "revision": "782bc76be09c0c5dd08e3edd04e4ec1054c3158e", + "url": "https://github.com/ribru17/blink-cmp-spell/archive/782bc76be09c0c5dd08e3edd04e4ec1054c3158e.tar.gz", + "hash": "13adgj9qxfmbwzvx348kpkm70h0jli9qv3bqhkwh8p6zkfajm607" }, "blink-compat": { "type": "Git", @@ -95,9 +95,9 @@ "repo": "blink-ripgrep.nvim" }, "branch": "main", - "revision": "305e1ae5363f527abdfd71915a3fe1f42af52824", - "url": "https://github.com/mikavilpas/blink-ripgrep.nvim/archive/305e1ae5363f527abdfd71915a3fe1f42af52824.tar.gz", - "hash": "1hcfyicgf33dlr2hhgnhhzdcxxqw1v8v1yjfbnwvlcsgw0rhjl8w" + "revision": "91aee73557237b0cc1313e4ed2b32f10de6cc65e", + "url": "https://github.com/mikavilpas/blink-ripgrep.nvim/archive/91aee73557237b0cc1313e4ed2b32f10de6cc65e.tar.gz", + "hash": "1jg4559946rzsvvny1r7jki1gmr70yjxr8qlnsjkjyxj8h0pjjwl" }, "bufdelete-nvim": { "type": "Git", @@ -119,9 +119,9 @@ "repo": "nvim" }, "branch": "main", - "revision": "4bb938bbba41d306db18bf0eb0633a5f28fd7ba0", - "url": "https://github.com/catppuccin/nvim/archive/4bb938bbba41d306db18bf0eb0633a5f28fd7ba0.tar.gz", - "hash": "112q9iqfp6ay13c1ca1s9svhxqfgnqfn0a1k2s7dy9ydswwmcxbk" + "revision": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429", + "url": "https://github.com/catppuccin/nvim/archive/5b5e3aef9ad7af84f463d17b5479f06b87d5c429.tar.gz", + "hash": "0jmrwag2dx4b1g9x32xwxcr8y0l159hqks09z5miy99wav6dy7z2" }, "ccc-nvim": { "type": "Git", @@ -251,9 +251,9 @@ "repo": "codecompanion.nvim" }, "branch": "main", - "revision": "dd81bd9176daba9ea507cd0457f662c0a15c001f", - "url": "https://github.com/olimorris/codecompanion.nvim/archive/dd81bd9176daba9ea507cd0457f662c0a15c001f.tar.gz", - "hash": "09a20q1hshp07nf9n8w4cxpa8s32vwyd4ya0gdnx5jp7g00dksrg" + "revision": "4f56b047f03bf5edc0d71bf0ca694243a49b912f", + "url": "https://github.com/olimorris/codecompanion.nvim/archive/4f56b047f03bf5edc0d71bf0ca694243a49b912f.tar.gz", + "hash": "1mrb8qxd6mz5dlly9bh30pcd599gfy173f6pd4p8lszs3xhp598k" }, "codewindow-nvim": { "type": "Git", @@ -287,9 +287,9 @@ "repo": "conform.nvim" }, "branch": "master", - "revision": "a6f5bdb78caa305496357d17e962bbc4c0b392e2", - "url": "https://github.com/stevearc/conform.nvim/archive/a6f5bdb78caa305496357d17e962bbc4c0b392e2.tar.gz", - "hash": "1jkm8pbfnp2s9y70cc67pj2fa25a4jl1y4lx6y1k5i323f4lplhz" + "revision": "db8a4a9edb217067b1d7a2e0362c74bfe9cc944d", + "url": "https://github.com/stevearc/conform.nvim/archive/db8a4a9edb217067b1d7a2e0362c74bfe9cc944d.tar.gz", + "hash": "13vpizk8ani64d3a9yrm0g3bz8m6m6cxnpzr2xgslbhxnkmbxq7j" }, "copilot-cmp": { "type": "Git", @@ -323,9 +323,9 @@ "repo": "crates.nvim" }, "branch": "main", - "revision": "1803c8b5516610ba7cdb759a4472a78414ee6cd4", - "url": "https://github.com/Saecki/crates.nvim/archive/1803c8b5516610ba7cdb759a4472a78414ee6cd4.tar.gz", - "hash": "0bqcdsbhs1ab51nmqd3cx7p6nlpmrjj0a53hax9scpqzr23nvr66" + "revision": "403a0abef0e2aec12749a534dc468d6fd50c6741", + "url": "https://github.com/Saecki/crates.nvim/archive/403a0abef0e2aec12749a534dc468d6fd50c6741.tar.gz", + "hash": "19ix86nbww5vljinfwfpjkz806j7dzw4pgjyjya201jb0n22lrc6" }, "csharpls-extended-lsp-nvim": { "type": "Git", @@ -335,9 +335,9 @@ "repo": "csharpls-extended-lsp.nvim" }, "branch": "master", - "revision": "7768c15fe901fd58bfd557034a3cad191a820cfb", - "url": "https://github.com/Decodetalkers/csharpls-extended-lsp.nvim/archive/7768c15fe901fd58bfd557034a3cad191a820cfb.tar.gz", - "hash": "0s2jpc22c6s9nnp47kia01bv95xipyn08d0s0pax11fddv2b951f" + "revision": "991d2c43afd7c7be77edd27a2ae686f9779382da", + "url": "https://github.com/Decodetalkers/csharpls-extended-lsp.nvim/archive/991d2c43afd7c7be77edd27a2ae686f9779382da.tar.gz", + "hash": "10jj6x78k34yrarp5ydc7n1ylp2xxgxl7jqh1y4d133mgcygabak" }, "dashboard-nvim": { "type": "Git", @@ -407,9 +407,9 @@ "repo": "elixir-tools.nvim" }, "branch": "main", - "revision": "f7e18753f5587b422aac628249fa46c66ed24af3", - "url": "https://github.com/elixir-tools/elixir-tools.nvim/archive/f7e18753f5587b422aac628249fa46c66ed24af3.tar.gz", - "hash": "06h1aqdkr3c5samz819j8c1cgnz636p6qbiavg504fd4kqz3ykzr" + "revision": "6beae8194152e2d8b4a59de19a3e60c1f7ffcff5", + "url": "https://github.com/elixir-tools/elixir-tools.nvim/archive/6beae8194152e2d8b4a59de19a3e60c1f7ffcff5.tar.gz", + "hash": "0kncq60x3kvy4plszq4zygrsy6cyzf43g2xgzqwif88i85ki7zq6" }, "fastaction-nvim": { "type": "Git", @@ -443,9 +443,9 @@ "repo": "flutter-tools.nvim" }, "branch": "main", - "revision": "d135e1d02f6a3a8808efc2b58950ab1fdd49d000", - "url": "https://github.com/akinsho/flutter-tools.nvim/archive/d135e1d02f6a3a8808efc2b58950ab1fdd49d000.tar.gz", - "hash": "06hiiwzb00lc7qalq74lyydks8v007fnsbpkgpkfm7zki0dg22m7" + "revision": "70430c32d176f4a15c6e2c80586cd2791e3a664e", + "url": "https://github.com/akinsho/flutter-tools.nvim/archive/70430c32d176f4a15c6e2c80586cd2791e3a664e.tar.gz", + "hash": "01p721ca4as9b9nn4qibb6s775fn66j13zsx2d3flhkssii06v45" }, "friendly-snippets": { "type": "Git", @@ -467,9 +467,9 @@ "repo": "fzf-lua" }, "branch": "main", - "revision": "9b84b53f3297d4912d7eb95b979e9b27e2e61281", - "url": "https://github.com/ibhagwan/fzf-lua/archive/9b84b53f3297d4912d7eb95b979e9b27e2e61281.tar.gz", - "hash": "1p3fb68h7x50b6m6aaxxqcylipa5rdg0yfz6jlrd5i2kmr5gxldq" + "revision": "03eed634a3b1f4a4dc53f928868566b0b697dabe", + "url": "https://github.com/ibhagwan/fzf-lua/archive/03eed634a3b1f4a4dc53f928868566b0b697dabe.tar.gz", + "hash": "007fz9rwhcfx8l6k6dfnm91dcc4gsazr3vqbv95z5l1h1j184v6c" }, "gesture-nvim": { "type": "Git", @@ -515,9 +515,9 @@ "repo": "gitsigns.nvim" }, "branch": "main", - "revision": "4c40357994f386e72be92a46f41fc1664c84c87d", - "url": "https://github.com/lewis6991/gitsigns.nvim/archive/4c40357994f386e72be92a46f41fc1664c84c87d.tar.gz", - "hash": "1d3i82g5barb9afk7ra3gmcwwjvaqp49sbdz0acki4a0yc80m31w" + "revision": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9", + "url": "https://github.com/lewis6991/gitsigns.nvim/archive/7010000889bfb6c26065e0b0f7f1e6aa9163edd9.tar.gz", + "hash": "0hl572j5l1bqg51rg545bavxs8kxya02ss3fj5fxvp9ylrnaqsx9" }, "glow-nvim": { "type": "Git", @@ -539,9 +539,9 @@ "repo": "gruvbox.nvim" }, "branch": "main", - "revision": "089b60e92aa0a1c6fa76ff527837cd35b6f5ac81", - "url": "https://github.com/ellisonleao/gruvbox.nvim/archive/089b60e92aa0a1c6fa76ff527837cd35b6f5ac81.tar.gz", - "hash": "0mr8q2xi4s2anibll8lhxax7q1akyg687bp5r58gckkhi04064q4" + "revision": "15958f5ee43e144856cd2084ce6c571bfdb44504", + "url": "https://github.com/ellisonleao/gruvbox.nvim/archive/15958f5ee43e144856cd2084ce6c571bfdb44504.tar.gz", + "hash": "16nrxcpds3zacqmfw5jsd5d8qqbwllkw9xacjkglcnaynp4qghqq" }, "harpoon": { "type": "Git", @@ -563,9 +563,9 @@ "repo": "haskell-tools.nvim" }, "branch": "master", - "revision": "834d949f3911297fd657787c73f647be9675ae53", - "url": "https://github.com/mrcjkb/haskell-tools.nvim/archive/834d949f3911297fd657787c73f647be9675ae53.tar.gz", - "hash": "1l4jm6010mhjq8bvjc0sbqh0bfadyrq2wisdvsjrgjb0h0w1s8d4" + "revision": "52608d83b424de44e914711c0f505906816e7427", + "url": "https://github.com/mrcjkb/haskell-tools.nvim/archive/52608d83b424de44e914711c0f505906816e7427.tar.gz", + "hash": "1ngz8zzyni2wh0xhvrcl27am39kqaaabh5y9c4i8ym211ravzhv6" }, "highlight-undo-nvim": { "type": "Git", @@ -662,9 +662,9 @@ "repo": "leap.nvim" }, "branch": "main", - "revision": "8b826a9fc766bffd14288aee01847cb0d6c6c383", - "url": "https://github.com/ggandor/leap.nvim/archive/8b826a9fc766bffd14288aee01847cb0d6c6c383.tar.gz", - "hash": "1biydwaky3104c1dys8m37yalrgcwyjyprlbk31j82y4mvmd1lmy" + "revision": "346a16ef942635a8ca5ff92e603d07e7e8be6cbe", + "url": "https://github.com/ggandor/leap.nvim/archive/346a16ef942635a8ca5ff92e603d07e7e8be6cbe.tar.gz", + "hash": "0rq73f7sw1sf8dn6angwgns8jd811aiixmvrndgqz2939dlqaw2l" }, "leetcode-nvim": { "type": "Git", @@ -697,9 +697,9 @@ "repo": "lsp_signature.nvim" }, "branch": "master", - "revision": "693b75f1dc31f5af45ceb762966a6ab00af1850b", - "url": "https://github.com/ray-x/lsp_signature.nvim/archive/693b75f1dc31f5af45ceb762966a6ab00af1850b.tar.gz", - "hash": "0jfiips0ddbry91h52k671sll0zfqpz10dc8fw0w5np6lwiy7z34" + "revision": "8b681c86b0bd7f932cd91987983d91497e43d83f", + "url": "https://github.com/ray-x/lsp_signature.nvim/archive/8b681c86b0bd7f932cd91987983d91497e43d83f.tar.gz", + "hash": "1ap077hgl334klfyi2hv81hf6r9mqpkarrz0b3ky99aavz7bmn2j" }, "lspkind-nvim": { "type": "Git", @@ -745,9 +745,9 @@ "repo": "lualine.nvim" }, "branch": "master", - "revision": "f4f791f67e70d378a754d02da068231d2352e5bc", - "url": "https://github.com/hoob3rt/lualine.nvim/archive/f4f791f67e70d378a754d02da068231d2352e5bc.tar.gz", - "hash": "12jm3vc3mi0p9kjw7g1cd6a9nkgws1mvq2h7lpfmflad8zfmw35q" + "revision": "b8b60c7f1d0d95ad74ee215b2291280b30482476", + "url": "https://github.com/hoob3rt/lualine.nvim/archive/b8b60c7f1d0d95ad74ee215b2291280b30482476.tar.gz", + "hash": "02xyjp446b2nypw3hh4k6b6g9f892kxmmdv23s7dypcws28v50m9" }, "luasnip": { "type": "Git", @@ -769,9 +769,9 @@ "repo": "lz.n" }, "branch": "master", - "revision": "eb94a39433518b26a0eeb117b937b21dc6b18713", - "url": "https://github.com/nvim-neorocks/lz.n/archive/eb94a39433518b26a0eeb117b937b21dc6b18713.tar.gz", - "hash": "1sarbbj53b5f4mcj6b1iqkbjacrh3w63vp8dpz6j802wqwvi51wc" + "revision": "d5856041d60f9500804c872709b8d5f59505d92b", + "url": "https://github.com/nvim-neorocks/lz.n/archive/d5856041d60f9500804c872709b8d5f59505d92b.tar.gz", + "hash": "1dxsy8baq7zdc047ixxxa1qkfw48jgbng4vngwlg6gc2rv16rf36" }, "lzn-auto-require": { "type": "Git", @@ -841,9 +841,9 @@ "repo": "mini.base16" }, "branch": "main", - "revision": "d64302f57a692a2ff2c9a4556935780133f821f9", - "url": "https://github.com/echasnovski/mini.base16/archive/d64302f57a692a2ff2c9a4556935780133f821f9.tar.gz", - "hash": "1vkhhqb9785ypmp7bzqljxfdjg5gz5jxkxp0wl6iacjvwwf18dq7" + "revision": "44240f11871c15aba8fc49959ebd27c0b4768a40", + "url": "https://github.com/echasnovski/mini.base16/archive/44240f11871c15aba8fc49959ebd27c0b4768a40.tar.gz", + "hash": "0z4vvsm2hc1cab5qqd28x6jzyzh23cdijrrs1hkkkj0nj3si3zkn" }, "mini-basics": { "type": "Git", @@ -865,9 +865,9 @@ "repo": "mini.bracketed" }, "branch": "main", - "revision": "95e1023c1734c805ad3b9da364fc3518e0881c70", - "url": "https://github.com/echasnovski/mini.bracketed/archive/95e1023c1734c805ad3b9da364fc3518e0881c70.tar.gz", - "hash": "0is5mk998v3givmlfq5c09pdww7bm1nmrwm5iijhvjgc2rlxxlc4" + "revision": "0ec65567ffde0ad4d94d794d55f3b627203b496a", + "url": "https://github.com/echasnovski/mini.bracketed/archive/0ec65567ffde0ad4d94d794d55f3b627203b496a.tar.gz", + "hash": "05xg63hw83n99al5sylysbq1xpschlj547s3j484jjs7wsbzzp6c" }, "mini-bufremove": { "type": "Git", @@ -889,9 +889,9 @@ "repo": "mini.clue" }, "branch": "main", - "revision": "3ba5f3ff9afbf8c962bf69a483a890e414ba4697", - "url": "https://github.com/echasnovski/mini.clue/archive/3ba5f3ff9afbf8c962bf69a483a890e414ba4697.tar.gz", - "hash": "0j9l26kzvsc0p7xssav97r28cnqbr5av6k64nz83n3xx5xlndnp0" + "revision": "08901d2223797aa25611c33aaf9d8a1049a653bb", + "url": "https://github.com/echasnovski/mini.clue/archive/08901d2223797aa25611c33aaf9d8a1049a653bb.tar.gz", + "hash": "026d647acwxr0wrf43lffmzw4x84jm6v5lipbqqpicqgqs8b4rfv" }, "mini-colors": { "type": "Git", @@ -901,9 +901,9 @@ "repo": "mini.colors" }, "branch": "main", - "revision": "60306b701f574c3f7111a7ef67de208d0c121bbd", - "url": "https://github.com/echasnovski/mini.colors/archive/60306b701f574c3f7111a7ef67de208d0c121bbd.tar.gz", - "hash": "1avblmv2alra43dlq94czmnd4rsjwng66yjg7xcn4bs358z13kzw" + "revision": "d49e0764821d40adbf3f9e92091dfba0b0590378", + "url": "https://github.com/echasnovski/mini.colors/archive/d49e0764821d40adbf3f9e92091dfba0b0590378.tar.gz", + "hash": "1kn5012q6x1hfpyjqhssydln3v6b25gvvjw1zhw93m8x9km2j524" }, "mini-comment": { "type": "Git", @@ -925,9 +925,9 @@ "repo": "mini.completion" }, "branch": "main", - "revision": "dd457bfecf68fb67107f8668b46f745a219c045a", - "url": "https://github.com/echasnovski/mini.completion/archive/dd457bfecf68fb67107f8668b46f745a219c045a.tar.gz", - "hash": "1aharapzl1ll2fpyhl88n47ni12p0mndgpgi34jn57k3mhj0pcgy" + "revision": "8f439dfb5432f9a78fb172ec7e03ee31f18551c4", + "url": "https://github.com/echasnovski/mini.completion/archive/8f439dfb5432f9a78fb172ec7e03ee31f18551c4.tar.gz", + "hash": "0y4zzp4najk2bydwzx72nbn18n32v6ar0dc2qgialszivy0nnhgh" }, "mini-diff": { "type": "Git", @@ -973,9 +973,9 @@ "repo": "mini.files" }, "branch": "main", - "revision": "5900f50608771af55c6cc4f0817152e5e89de820", - "url": "https://github.com/echasnovski/mini.files/archive/5900f50608771af55c6cc4f0817152e5e89de820.tar.gz", - "hash": "1xq2b3xacn5haamw5vmwzmjqqgacrwmfp0yci69kmgpxa8ac3dq0" + "revision": "0a396f5ca5516a07959ae2c00667e1a26c20f0ea", + "url": "https://github.com/echasnovski/mini.files/archive/0a396f5ca5516a07959ae2c00667e1a26c20f0ea.tar.gz", + "hash": "1axjd6a6c02jllhi1l8c9xfplipvz4g82hnxjbsgx4kzc9b60zdq" }, "mini-fuzzy": { "type": "Git", @@ -985,9 +985,9 @@ "repo": "mini.fuzzy" }, "branch": "main", - "revision": "345ff7f65f50177c5567c43ec2c79973cb1278fe", - "url": "https://github.com/echasnovski/mini.fuzzy/archive/345ff7f65f50177c5567c43ec2c79973cb1278fe.tar.gz", - "hash": "18ylb8v7g21r87qkl86hng3zvw9c2q163z535m5m85dxnrxzlgcm" + "revision": "fb42763285075e316fd4250739af9b8c442503de", + "url": "https://github.com/echasnovski/mini.fuzzy/archive/fb42763285075e316fd4250739af9b8c442503de.tar.gz", + "hash": "0hl5ygzlf73g70j7pdd1x4975368sqpynpja1zx7bc5jln698vr4" }, "mini-git": { "type": "Git", @@ -1021,9 +1021,9 @@ "repo": "mini.hues" }, "branch": "main", - "revision": "6b039a95f8fbc002ea79086b8617a1022a5aea5b", - "url": "https://github.com/echasnovski/mini.hues/archive/6b039a95f8fbc002ea79086b8617a1022a5aea5b.tar.gz", - "hash": "1cyk4abrkd6y5hkkh05cywvhg8116aiv7p8yihfcjwgrcjwkwsan" + "revision": "7a88e67dfb953820718106d8fc83d0f97c4d9173", + "url": "https://github.com/echasnovski/mini.hues/archive/7a88e67dfb953820718106d8fc83d0f97c4d9173.tar.gz", + "hash": "1kgjkx9bqycmm077i4jk0fnyl47fkmmd2vv0qf6lqsnnliivqxqw" }, "mini-icons": { "type": "Git", @@ -1093,9 +1093,9 @@ "repo": "mini.misc" }, "branch": "main", - "revision": "bfd8ee265d9cb1f9fcba7a8ae0899fbf84e33d5e", - "url": "https://github.com/echasnovski/mini.misc/archive/bfd8ee265d9cb1f9fcba7a8ae0899fbf84e33d5e.tar.gz", - "hash": "1fd3ah7gsm8zyagl3mk09aqrj8s2m0gxrx225nwbvb8i2pi0g1c1" + "revision": "a477a9d5790f6d899d3055c87f2e771118f91180", + "url": "https://github.com/echasnovski/mini.misc/archive/a477a9d5790f6d899d3055c87f2e771118f91180.tar.gz", + "hash": "1fp60lhv93jiygc0hvchzdzjgs8scczp7kv9cm3kzzimcfa84ky6" }, "mini-move": { "type": "Git", @@ -1117,9 +1117,9 @@ "repo": "mini.notify" }, "branch": "main", - "revision": "f8c84f89c8d981a979f915bd64a2f97bbad285d4", - "url": "https://github.com/echasnovski/mini.notify/archive/f8c84f89c8d981a979f915bd64a2f97bbad285d4.tar.gz", - "hash": "0raw9chqjgwxqdiqqk9xjxgkjf6rg14c7968pvfvfh9jkjdasxg8" + "revision": "e71f08013db6812d9ce95c2624ae405a4267f4f3", + "url": "https://github.com/echasnovski/mini.notify/archive/e71f08013db6812d9ce95c2624ae405a4267f4f3.tar.gz", + "hash": "0fmy3d62283j2cwlxk97fyylad2zkd5j2r7pg7fb3cq8k1021d0s" }, "mini-operators": { "type": "Git", @@ -1129,9 +1129,9 @@ "repo": "mini.operators" }, "branch": "main", - "revision": "81e5059268154f5a8b594c95748968febdd539e3", - "url": "https://github.com/echasnovski/mini.operators/archive/81e5059268154f5a8b594c95748968febdd539e3.tar.gz", - "hash": "066mh426wr9pb137d8b65cl5hkcgmal9mr8y94r3xya7649207mh" + "revision": "02cfac95919b945c19221f0fcebe883c6dce04f6", + "url": "https://github.com/echasnovski/mini.operators/archive/02cfac95919b945c19221f0fcebe883c6dce04f6.tar.gz", + "hash": "1b51b3d1qkbzh68yadx3fcx9dgk405cb2ghln999fl5czvc3crmd" }, "mini-pairs": { "type": "Git", @@ -1153,9 +1153,9 @@ "repo": "mini.pick" }, "branch": "main", - "revision": "bdd189e6b7741177db53875cbc6071f1c8dc6fbd", - "url": "https://github.com/echasnovski/mini.pick/archive/bdd189e6b7741177db53875cbc6071f1c8dc6fbd.tar.gz", - "hash": "1cxifi4vlfknk4i2grdrx5nbzw9jzj6s0ybbmwrcvs1cj9dhzbzh" + "revision": "12ea14f8e285d1bcc909116685fdbb129a89d546", + "url": "https://github.com/echasnovski/mini.pick/archive/12ea14f8e285d1bcc909116685fdbb129a89d546.tar.gz", + "hash": "1ssa7ym6zxhazx551bjsnfdmvm1553kj6amvcczw9jrqbf4ynjqy" }, "mini-sessions": { "type": "Git", @@ -1201,9 +1201,9 @@ "repo": "mini.starter" }, "branch": "main", - "revision": "4f46dc11e1dd9f62310794121405853be8d6b13f", - "url": "https://github.com/echasnovski/mini.starter/archive/4f46dc11e1dd9f62310794121405853be8d6b13f.tar.gz", - "hash": "1iic2f3d93fjiqrk0q1iq3sb6ycbw4vag4c01wk5wj1jc58k3iz5" + "revision": "736c5177bd90cc852c05d903f662f0fc395a4b4b", + "url": "https://github.com/echasnovski/mini.starter/archive/736c5177bd90cc852c05d903f662f0fc395a4b4b.tar.gz", + "hash": "0w2awkcrabbsybvv2hlzjlqgcr53480pg5p3fhaaparrhd90c7na" }, "mini-statusline": { "type": "Git", @@ -1249,9 +1249,9 @@ "repo": "mini.test" }, "branch": "main", - "revision": "82ae4d87a23faa27e7e4119d4a5cf5897cbf1b70", - "url": "https://github.com/echasnovski/mini.test/archive/82ae4d87a23faa27e7e4119d4a5cf5897cbf1b70.tar.gz", - "hash": "0n3n7j8lkxp6mc0wf80ysnwxfw29zjqyfs3ghjl518xbsvjbgcz6" + "revision": "16a909c3ce39d9af9ec4dacca16205d36f85d823", + "url": "https://github.com/echasnovski/mini.test/archive/16a909c3ce39d9af9ec4dacca16205d36f85d823.tar.gz", + "hash": "1qf8ay763d011rvy9qwpv8q3mlxjlymvc4gx3bjfv0n56k5dzpg0" }, "mini-trailspace": { "type": "Git", @@ -1273,9 +1273,9 @@ "repo": "mini.visits" }, "branch": "main", - "revision": "8a2b551a86c556c8a26ce8d6402d03ded1cc7aec", - "url": "https://github.com/echasnovski/mini.visits/archive/8a2b551a86c556c8a26ce8d6402d03ded1cc7aec.tar.gz", - "hash": "1jwpvxlsr8wd5wakd22ah7h127hsxj6ds7jp5m99w2gnlymhsq41" + "revision": "46e7a4074032d0340308c3379bc3650626c85da8", + "url": "https://github.com/echasnovski/mini.visits/archive/46e7a4074032d0340308c3379bc3650626c85da8.tar.gz", + "hash": "1776i3xn9dpccjjamy5ys5acc3nxd3zph4a77sbw2dipfd8zpasi" }, "minimap-vim": { "type": "Git", @@ -1336,9 +1336,9 @@ "repo": "neo-tree.nvim" }, "branch": "main", - "revision": "c2f12ba9dba917d53dba13121c15d7903e28c24d", - "url": "https://github.com/nvim-neo-tree/neo-tree.nvim/archive/c2f12ba9dba917d53dba13121c15d7903e28c24d.tar.gz", - "hash": "07hh7gjjp4zdhwdhrrd3mvndd6cqf0lydhsb5hn0aqagm65z2jm3" + "revision": "d9544c74ec43cca0564fdc334c116fbe0be8a807", + "url": "https://github.com/nvim-neo-tree/neo-tree.nvim/archive/d9544c74ec43cca0564fdc334c116fbe0be8a807.tar.gz", + "hash": "0wiw4aipg3qmzw6k9vrljh4cg09kyqd28s6xpv2zhsg05mm38nhb" }, "neocord": { "type": "Git", @@ -1348,9 +1348,9 @@ "repo": "neocord" }, "branch": "main", - "revision": "4d55d8dab2d5f2f272192add7a2c21982039c699", - "url": "https://github.com/IogaMaster/neocord/archive/4d55d8dab2d5f2f272192add7a2c21982039c699.tar.gz", - "hash": "18d84bd5242a3khpsk0iya3i75bc65mc2xc9kjldpvb827m6myl3" + "revision": "41bacd44e9d36f5e36e0271672ac2c02f6fa355a", + "url": "https://github.com/IogaMaster/neocord/archive/41bacd44e9d36f5e36e0271672ac2c02f6fa355a.tar.gz", + "hash": "1n998zsv0bikscwpr75qq11xh559xzx6d7rs7fc21jj1rivkk4aw" }, "neorg": { "type": "Git", @@ -1360,9 +1360,9 @@ "repo": "neorg" }, "branch": "main", - "revision": "b47b4d3138beef51ffbf59bcbd7d149150b4bd2e", - "url": "https://github.com/nvim-neorg/neorg/archive/b47b4d3138beef51ffbf59bcbd7d149150b4bd2e.tar.gz", - "hash": "1x9sk24i8gyxssc8qz99x3d5nh3m2pi3srmv1f3fbgpffcgvl1yv" + "revision": "6f0b4eefa591fbc4c9344f110b0c0bac5b49078c", + "url": "https://github.com/nvim-neorg/neorg/archive/6f0b4eefa591fbc4c9344f110b0c0bac5b49078c.tar.gz", + "hash": "1x8h5hxzg06g1d849bna6rs4jzjf248g59v87zvlc4scmp9pzjga" }, "neorg-telescope": { "type": "Git", @@ -1384,9 +1384,9 @@ "repo": "neovim-session-manager" }, "branch": "master", - "revision": "270e235b014f0c37bf362eb1e8913d66bba33a2e", - "url": "https://github.com/Shatur/neovim-session-manager/archive/270e235b014f0c37bf362eb1e8913d66bba33a2e.tar.gz", - "hash": "16455f05wj5qjdvspj0hjwa77hsdhj3443h57lck3px33bz7n86h" + "revision": "3409dc920d40bec4c901c0a122a80bee03d6d1e1", + "url": "https://github.com/Shatur/neovim-session-manager/archive/3409dc920d40bec4c901c0a122a80bee03d6d1e1.tar.gz", + "hash": "1f7farfkr5ldpa7y7hz9sh8dp7538x1xvwr9n1zrra1szf7s8rlk" }, "new-file-template-nvim": { "type": "Git", @@ -1456,9 +1456,9 @@ "repo": "nui.nvim" }, "branch": "main", - "revision": "53e907ffe5eedebdca1cd503b00aa8692068ca46", - "url": "https://github.com/MunifTanjim/nui.nvim/archive/53e907ffe5eedebdca1cd503b00aa8692068ca46.tar.gz", - "hash": "1m4vlf9qcs01a8qrq3salcz966sp8cpf01gbrg8dbf255vzc8kp9" + "revision": "8d3bce9764e627b62b07424e0df77f680d47ffdb", + "url": "https://github.com/MunifTanjim/nui.nvim/archive/8d3bce9764e627b62b07424e0df77f680d47ffdb.tar.gz", + "hash": "0ia8q5d4xcss45vw6jlaanyr0migy03cjzq9g0kipfyqxkcxi105" }, "nvim-autopairs": { "type": "Git", @@ -1492,9 +1492,9 @@ "repo": "nvim-cmp" }, "branch": "main", - "revision": "5a11682453ac6b13dbf32cd403da4ee9c07ef1c3", - "url": "https://github.com/hrsh7th/nvim-cmp/archive/5a11682453ac6b13dbf32cd403da4ee9c07ef1c3.tar.gz", - "hash": "06n3barrl80i0y43q250l49q07f7hry9w5ggwlimv7jxvilih43l" + "revision": "1e1900b0769324a9675ef85b38f99cca29e203b3", + "url": "https://github.com/hrsh7th/nvim-cmp/archive/1e1900b0769324a9675ef85b38f99cca29e203b3.tar.gz", + "hash": "1yqg4gnzmlm9h5rcmzv7msjmqna0ffn7gllf5knfkps5ns0ynpyf" }, "nvim-colorizer-lua": { "type": "Git", @@ -1504,9 +1504,9 @@ "repo": "nvim-colorizer.lua" }, "branch": "master", - "revision": "943be69156b94fbc96064f4913d653f0c7fb299f", - "url": "https://github.com/NvChad/nvim-colorizer.lua/archive/943be69156b94fbc96064f4913d653f0c7fb299f.tar.gz", - "hash": "0fb973i0h0dq02zr7c9ivm9vk64w6h3px9db2gqb6rzrm2inf0m1" + "revision": "517df88cf2afb36652830df2c655df2da416a0ae", + "url": "https://github.com/NvChad/nvim-colorizer.lua/archive/517df88cf2afb36652830df2c655df2da416a0ae.tar.gz", + "hash": "0gaxkq30wvxq3d8x6l6r10vdxyizfi5g55xnvzw69lfyl61d9qy8" }, "nvim-cursorline": { "type": "Git", @@ -1528,9 +1528,9 @@ "repo": "nvim-dap" }, "branch": "master", - "revision": "6e0e8ab4d8ed520076971465a4388dfe54a91d83", - "url": "https://github.com/mfussenegger/nvim-dap/archive/6e0e8ab4d8ed520076971465a4388dfe54a91d83.tar.gz", - "hash": "09skngq8caazmggdmqs7490i8icg6fxzwf1nxkc0hkg6ja82b0nb" + "revision": "a720d4966f758ab22e8ec28812b6df90a53e0f02", + "url": "https://github.com/mfussenegger/nvim-dap/archive/a720d4966f758ab22e8ec28812b6df90a53e0f02.tar.gz", + "hash": "0b979dhl5jr3kx9j5zih39jbrv22d554ws6y8g1cgsm2i3412s4h" }, "nvim-dap-go": { "type": "Git", @@ -1600,9 +1600,9 @@ "repo": "nvim-lspconfig" }, "branch": "master", - "revision": "9e932edb0af4e20880685ddb96a231669fbe8091", - "url": "https://github.com/neovim/nvim-lspconfig/archive/9e932edb0af4e20880685ddb96a231669fbe8091.tar.gz", - "hash": "08hwg32a9yj78w4mh2idcpaig9qbx48ak8aqkp88z4wm65299v4r" + "revision": "8a1529e46eef5efc86c34c8d9bdd313abc2ecba0", + "url": "https://github.com/neovim/nvim-lspconfig/archive/8a1529e46eef5efc86c34c8d9bdd313abc2ecba0.tar.gz", + "hash": "0l9mns71hh0jssxblr1q286z8hmxwbgyq1nw6scki9ffn23jwnz0" }, "nvim-metals": { "type": "Git", @@ -1612,9 +1612,9 @@ "repo": "nvim-metals" }, "branch": "main", - "revision": "5d27f4918ea954772725d6741f84a71cfaff932a", - "url": "https://github.com/scalameta/nvim-metals/archive/5d27f4918ea954772725d6741f84a71cfaff932a.tar.gz", - "hash": "17769ccpkkb53bikhfp2m809xs6p0mszb8d1hnssp1l0s3ip2j1f" + "revision": "fe6125f633c1b2f68d468a2041e81e2e5e8933d4", + "url": "https://github.com/scalameta/nvim-metals/archive/fe6125f633c1b2f68d468a2041e81e2e5e8933d4.tar.gz", + "hash": "1xpav9ykwk7kz61c6y33kyjxf0nf47risdj0q9gf5rnl88cln4by" }, "nvim-navbuddy": { "type": "Git", @@ -1696,9 +1696,9 @@ "repo": "nvim-surround" }, "branch": "main", - "revision": "ae298105122c87bbe0a36b1ad20b06d417c0433e", - "url": "https://github.com/kylechui/nvim-surround/archive/ae298105122c87bbe0a36b1ad20b06d417c0433e.tar.gz", - "hash": "1xrkg4is4spjwkzr6l0qmn3axlrm52d2wm69g2db83jww756pz1h" + "revision": "6c54643ef42016b744888b06d2381abd23f9b7ea", + "url": "https://github.com/kylechui/nvim-surround/archive/6c54643ef42016b744888b06d2381abd23f9b7ea.tar.gz", + "hash": "1c5agqfffmjxc73bv8d4hmrnzx62ikqpv7pii19v5alfdcnh5j48" }, "nvim-tree-lua": { "type": "Git", @@ -1708,9 +1708,9 @@ "repo": "nvim-tree.lua" }, "branch": "master", - "revision": "6709463b2d18e77f7a946027917aa00d4aaed6f4", - "url": "https://github.com/nvim-tree/nvim-tree.lua/archive/6709463b2d18e77f7a946027917aa00d4aaed6f4.tar.gz", - "hash": "1m26fvvsj4lxlwdinvnz8nz968n6x59w8n7zj7vsqm5i8yi84fr6" + "revision": "c09ff35de503a41fa62465c6b4ae72d96e7a7ce4", + "url": "https://github.com/nvim-tree/nvim-tree.lua/archive/c09ff35de503a41fa62465c6b4ae72d96e7a7ce4.tar.gz", + "hash": "0bnc2fc9ipz9yp917l61vvcaqmbdg5fhqxrp7jfjxj5qmvadhai9" }, "nvim-treesitter-context": { "type": "Git", @@ -1720,9 +1720,9 @@ "repo": "nvim-treesitter-context" }, "branch": "master", - "revision": "198720b4016af04c9590f375d714d5bf8afecc1a", - "url": "https://github.com/nvim-treesitter/nvim-treesitter-context/archive/198720b4016af04c9590f375d714d5bf8afecc1a.tar.gz", - "hash": "13msw9i509ncysbgkqbl2wr1c23iw3f4mxkw30sc1yk9x9nx49ri" + "revision": "572e534c9f881bb9bf9f388e4c87f360446c72d4", + "url": "https://github.com/nvim-treesitter/nvim-treesitter-context/archive/572e534c9f881bb9bf9f388e4c87f360446c72d4.tar.gz", + "hash": "0bg3x75j8mwvpdhwd945lxbwmhw2j1qi135zn0yli78c9jn8g0ay" }, "nvim-ts-autotag": { "type": "Git", @@ -1756,9 +1756,9 @@ "repo": "nvim-web-devicons" }, "branch": "master", - "revision": "1020869742ecb191f260818234517f4a1515cfe8", - "url": "https://github.com/nvim-tree/nvim-web-devicons/archive/1020869742ecb191f260818234517f4a1515cfe8.tar.gz", - "hash": "024c8c5d6lpakgf9jxzrbkxk3r8haxa7qhmp8i4zsg35ycg6vqaq" + "revision": "d0cafff5c4347a604a07edf7bb9a91fda7eb577e", + "url": "https://github.com/nvim-tree/nvim-web-devicons/archive/d0cafff5c4347a604a07edf7bb9a91fda7eb577e.tar.gz", + "hash": "1j5ccksn2lkd1f1fvhhjs2amhq17wxmgcqv6jk05jpdbngw2mv98" }, "obsidian-nvim": { "type": "Git", @@ -1804,9 +1804,9 @@ "repo": "orgmode" }, "branch": "master", - "revision": "c0cdcbdced83ceb9b9f058b402a8bfc5f64ab3a6", - "url": "https://github.com/nvim-orgmode/orgmode/archive/c0cdcbdced83ceb9b9f058b402a8bfc5f64ab3a6.tar.gz", - "hash": "0qwv2pg4s9spmy5wvkvflhcb0a2drlygch6hmjanj3g2kkn3ph5f" + "revision": "abf8890a9b0612c51d738268c759c4331bc2109c", + "url": "https://github.com/nvim-orgmode/orgmode/archive/abf8890a9b0612c51d738268c759c4331bc2109c.tar.gz", + "hash": "0j4f2y47s5ymii1w0r9gk39z4vks5fc9cy0rvj1vzml4vf4wijsi" }, "otter-nvim": { "type": "Git", @@ -1864,9 +1864,9 @@ "repo": "precognition.nvim" }, "branch": "main", - "revision": "24f2cc51dccecec4cf3de04bfbd14f5b9e79df0b", - "url": "https://github.com/tris203/precognition.nvim/archive/24f2cc51dccecec4cf3de04bfbd14f5b9e79df0b.tar.gz", - "hash": "0x7i2cim9jwc90v11wm61qbbq54m5581hsvj5jaash3gb5piacvw" + "revision": "4223fb903cbafc3bd8a87a314dac375bbd1c01ce", + "url": "https://github.com/tris203/precognition.nvim/archive/4223fb903cbafc3bd8a87a314dac375bbd1c01ce.tar.gz", + "hash": "11ng6p0xmrjky5xr9jdkrrav7is9r090qhs2fsnbg16124bgb0g5" }, "project-nvim": { "type": "Git", @@ -1900,9 +1900,9 @@ "repo": "rainbow-delimiters.nvim" }, "branch": "master", - "revision": "011d98eaa3a73b5a51d82ce5bc6b1397dde95562", - "url": "https://github.com/HiPhish/rainbow-delimiters.nvim/archive/011d98eaa3a73b5a51d82ce5bc6b1397dde95562.tar.gz", - "hash": "0b2hr4afdp9b30ckh772bg5wbscgdjvssn533988and27jassfaf" + "revision": "f1e5490e87478cf0b528250ebb51552f3d08436a", + "url": "https://github.com/HiPhish/rainbow-delimiters.nvim/archive/f1e5490e87478cf0b528250ebb51552f3d08436a.tar.gz", + "hash": "02265awjpkd8v6s22wx8qrk2wxq8b7c7h5lr9n7pi6d4lwyrkrxf" }, "registers-nvim": { "type": "Git", @@ -1924,9 +1924,9 @@ "repo": "render-markdown.nvim" }, "branch": "main", - "revision": "57fa691b9e374c6539cc0340062dac8f42d4bd8b", - "url": "https://github.com/MeanderingProgrammer/render-markdown.nvim/archive/57fa691b9e374c6539cc0340062dac8f42d4bd8b.tar.gz", - "hash": "1kfzj1sj1ljy3ihp7ic3n4cs82im61yh6xvr68m39jg5a1zmy9iv" + "revision": "08e1fa4e281e48ee4aa892428de9fb91e66edca6", + "url": "https://github.com/MeanderingProgrammer/render-markdown.nvim/archive/08e1fa4e281e48ee4aa892428de9fb91e66edca6.tar.gz", + "hash": "1kiwa88l2262ycfj6z70hdriml0y2wnji3l9w27jbky9zxwhazrs" }, "rose-pine": { "type": "Git", @@ -1936,9 +1936,9 @@ "repo": "neovim" }, "branch": "main", - "revision": "3fe41d3959110139e03bcbc6c0c648be83d06b33", - "url": "https://github.com/rose-pine/neovim/archive/3fe41d3959110139e03bcbc6c0c648be83d06b33.tar.gz", - "hash": "105bdjw4phv5229yp0zyrkvf8v6l38rgcp83qy7ap9vlna57fk46" + "revision": "7d1b5c7dcd274921f0f58e90a8bf935f6a95fbf3", + "url": "https://github.com/rose-pine/neovim/archive/7d1b5c7dcd274921f0f58e90a8bf935f6a95fbf3.tar.gz", + "hash": "0iy9is76bhgb17v0l7mr95mkhd9b4ah917v9shx74jp1xsgc481q" }, "rtp-nvim": { "type": "Git", @@ -1972,9 +1972,9 @@ "repo": "rustaceanvim" }, "branch": "master", - "revision": "2feffcf9aa0e160221caafd544c4dedf30414522", - "url": "https://github.com/mrcjkb/rustaceanvim/archive/2feffcf9aa0e160221caafd544c4dedf30414522.tar.gz", - "hash": "1x3fw90k78s3kx3hrhgk1zdv9wd2kbkhmip06q5s61p4zw6bns5r" + "revision": "c7cc0e00ec53cafaa38e258cba4a6507c180289b", + "url": "https://github.com/mrcjkb/rustaceanvim/archive/c7cc0e00ec53cafaa38e258cba4a6507c180289b.tar.gz", + "hash": "1514w2x5vpn790rz8wkah0chr7yz9sm5whaprnm1qc26fz4jwc17" }, "smartcolumn-nvim": { "type": "Git", @@ -2068,9 +2068,9 @@ "repo": "toggleterm.nvim" }, "branch": "main", - "revision": "e76134e682c1a866e3dfcdaeb691eb7b01068668", - "url": "https://github.com/akinsho/toggleterm.nvim/archive/e76134e682c1a866e3dfcdaeb691eb7b01068668.tar.gz", - "hash": "1jyg3nv54kssz2a4blpwhd718msf95zqz6sr2sqblc7b35gm73g1" + "revision": "9a88eae817ef395952e08650b3283726786fb5fb", + "url": "https://github.com/akinsho/toggleterm.nvim/archive/9a88eae817ef395952e08650b3283726786fb5fb.tar.gz", + "hash": "17plyvajwdhpiadsd80vph75qll8pv9571c2wnw35ngmw9gmnavz" }, "tokyonight": { "type": "Git", @@ -2116,9 +2116,9 @@ "repo": "typst-preview.nvim" }, "branch": "master", - "revision": "df393b47c5bc35abe4d60bb479afd0c15802fda8", - "url": "https://github.com/chomosuke/typst-preview.nvim/archive/df393b47c5bc35abe4d60bb479afd0c15802fda8.tar.gz", - "hash": "1k4ir8ss25fm58xfy0588wjim8dxl6vjdl4va2br3knx6jcy2jd8" + "revision": "ddcc71126f910ec83037622bc8d506f91a290ade", + "url": "https://github.com/chomosuke/typst-preview.nvim/archive/ddcc71126f910ec83037622bc8d506f91a290ade.tar.gz", + "hash": "1iqcbpgk87gcgnqd5dv8n4h4hbildp5hbjhnlwjx5zlzcg5qv2my" }, "vim-dirtytalk": { "type": "Git", @@ -2212,10 +2212,10 @@ "repo": "yanky.nvim" }, "branch": "main", - "revision": "9543d4c6c537720419bccb3338c4ddd5bb6fbd44", - "url": "https://github.com/gbprod/yanky.nvim/archive/9543d4c6c537720419bccb3338c4ddd5bb6fbd44.tar.gz", - "hash": "017v0f082pfd79q2j1naapybsmismflwdscn58mhbqh7s7mq8qk8" + "revision": "80d9385dbebe7049fd1961d7909b835a58ce9dcc", + "url": "https://github.com/gbprod/yanky.nvim/archive/80d9385dbebe7049fd1961d7909b835a58ce9dcc.tar.gz", + "hash": "1lg9nxc01shkazqk5g3j0iskiqbwr9sxv07sqrwkwlh36jn59rcp" } }, "version": 3 -} \ No newline at end of file +} From ed2ce4bd0241c1e24e53bc3465517a4823492569 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 16 Mar 2025 20:11:11 +0300 Subject: [PATCH 029/131] modules: clean up descriptions for colorizer & surround; add lazyload events to surround --- modules/plugins/ui/colorizer/colorizer.nix | 20 +++++++++++-------- modules/plugins/utility/surround/config.nix | 3 ++- modules/plugins/utility/surround/surround.nix | 14 +++++++++---- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/modules/plugins/ui/colorizer/colorizer.nix b/modules/plugins/ui/colorizer/colorizer.nix index 313097e7..1cee089f 100644 --- a/modules/plugins/ui/colorizer/colorizer.nix +++ b/modules/plugins/ui/colorizer/colorizer.nix @@ -102,11 +102,7 @@ in { setupOpts = mkPluginSetupOption "colorizer" { filetypes = mkOption { - description = '' - Filetypes to enable on and their option overrides. - - "*" means enable on all filetypes. Filetypes prefixed with "!" are disabled. - ''; + type = attrsOf settingSubmodule; default = {}; example = { "*" = {}; @@ -115,13 +111,21 @@ in { AARRGGBB = false; }; }; - type = attrsOf settingSubmodule; + description = '' + Filetypes to enable on and their option overrides. + + `"*"` means enable on all filetypes. Filetypes prefixed with `"!"` are disabled. + ''; }; user_default_options = mkOption { - description = "Default options"; - default = {}; type = settingSubmodule; + default = {}; + description = '' + `user_default_options` is the second parameter to nvim-colorizer's setup function. + + Anything set here is the inverse of the previous setup configuration. + ''; }; }; }; diff --git a/modules/plugins/utility/surround/config.nix b/modules/plugins/utility/surround/config.nix index 31b4033d..63a1f8d7 100644 --- a/modules/plugins/utility/surround/config.nix +++ b/modules/plugins/utility/surround/config.nix @@ -14,10 +14,11 @@ in { vim = { lazy.plugins.nvim-surround = { package = "nvim-surround"; - setupModule = "nvim-surround"; inherit (cfg) setupOpts; + event = ["BufReadPre" "BufNewFile"]; + keys = [ (mkLznKey "i" cfg.setupOpts.keymaps.insert) (mkLznKey "i" cfg.setupOpts.keymaps.insert_line) diff --git a/modules/plugins/utility/surround/surround.nix b/modules/plugins/utility/surround/surround.nix index 96ff5efb..475c283f 100644 --- a/modules/plugins/utility/surround/surround.nix +++ b/modules/plugins/utility/surround/surround.nix @@ -37,9 +37,13 @@ in { type = bool; default = false; description = '' - nvim-surround: add/change/delete surrounding delimiter pairs with ease. - Note that the default mappings deviate from upstream to avoid conflicts - with nvim-leap. + Whether to enable nvim-surround, Neovim plugin to add/change/delete + surrounding delimiter pairs with ease. + + ::: {.note} + The default mappings deviate from upstream to avoid conflicts with nvim-leap. + You may change thsoe in your configuration if you do not use nvim-leap + ::: ''; }; setupOpts = mkPluginSetupOption "nvim-surround" { @@ -61,7 +65,9 @@ in { useVendoredKeybindings = mkOption { type = bool; default = true; - description = "Use alternative set of keybindings that avoids conflicts with other popular plugins, e.g. nvim-leap"; + description = '' + Use alternative set of keybindings that avoids conflicts with other popular plugins, e.g. nvim-leap + ''; }; }; } From 07d7b7f3bdf5b974620bc4bc69dc9500504331af Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 16 Mar 2025 20:12:28 +0300 Subject: [PATCH 030/131] flake: bump inputs --- flake.lock | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 3b624bec..72912dee 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1738453229, - "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", + "lastModified": 1741352980, + "narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", + "rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "mnw": { "locked": { - "lastModified": 1738852285, - "narHash": "sha256-8Y1uyE6gGHxdU0Vcx2CMg/dAmDSxJw19aAl3TKbbo54=", + "lastModified": 1741647548, + "narHash": "sha256-UqVAeOylufUGIx7BXSneFHD8eI6n0sVwEY2noFENnSE=", "owner": "Gerg-L", "repo": "mnw", - "rev": "6ae73dc9cb72cea17bcc2e3d4670825f483e80e8", + "rev": "3fb89e600e26b91d1795cf8a1a34e11e084b4a04", "type": "github" }, "original": { @@ -62,11 +62,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1732053863, - "narHash": "sha256-DCIVdlb81Fct2uwzbtnawLBC/U03U2hqx8trqTJB7WA=", + "lastModified": 1741118843, + "narHash": "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c=", "owner": "oxalica", "repo": "nil", - "rev": "2e24c9834e3bb5aa2a3701d3713b43a6fb106362", + "rev": "577d160da311cc7f5042038456a0713e9863d09e", "type": "github" }, "original": { @@ -77,11 +77,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1740303746, - "narHash": "sha256-XcdiWLEhjJkMxDLKQJ0CCivmYYCvA5MDxu9pMybM5kM=", + "lastModified": 1741865919, + "narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2d068ae5c6516b2d04562de50a58c682540de9bf", + "rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a", "type": "github" }, "original": { @@ -93,14 +93,17 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1738452942, - "narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" + "lastModified": 1740877520, + "narHash": "sha256-oiwv/ZK/2FhGxrCkQkB83i7GnWXPPLzoqFHpDD3uYpk=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "147dee35aab2193b174e4c0868bd80ead5ce755c", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" } }, "nmd": { @@ -138,11 +141,11 @@ ] }, "locked": { - "lastModified": 1731983527, - "narHash": "sha256-JECaBgC0pQ91Hq3W4unH6K9to8s2Zl2sPNu7bLOv4ek=", + "lastModified": 1741055476, + "narHash": "sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "71287228d96e9568e1e70c6bbfa3f992d145947b", + "rev": "aefb7017d710f150970299685e8d8b549d653649", "type": "github" }, "original": { From dc2a38f273b0694379bb3d701cee6e5136401ebd Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 16 Mar 2025 20:13:20 +0300 Subject: [PATCH 031/131] utility/surround: fix typo in description --- modules/plugins/utility/surround/surround.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/utility/surround/surround.nix b/modules/plugins/utility/surround/surround.nix index 475c283f..2819b6d6 100644 --- a/modules/plugins/utility/surround/surround.nix +++ b/modules/plugins/utility/surround/surround.nix @@ -42,7 +42,7 @@ in { ::: {.note} The default mappings deviate from upstream to avoid conflicts with nvim-leap. - You may change thsoe in your configuration if you do not use nvim-leap + You may change those in your configuration if you do not use nvim-leap ::: ''; }; From cacbac08fb0738ca26da8ae1c321cadb1fc7dd6d Mon Sep 17 00:00:00 2001 From: raf Date: Sun, 16 Mar 2025 22:50:05 +0000 Subject: [PATCH 032/131] utiltiy/snacks-nvim: init module (#712) --- docs/release-notes/rl-0.8.md | 4 ++++ modules/plugins/utility/default.nix | 1 + .../plugins/utility/snacks-nvim/config.nix | 20 +++++++++++++++++++ .../plugins/utility/snacks-nvim/default.nix | 6 ++++++ .../utility/snacks-nvim/snacks-nvim.nix | 12 +++++++++++ npins/sources.json | 15 ++++++++------ 6 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 modules/plugins/utility/snacks-nvim/config.nix create mode 100644 modules/plugins/utility/snacks-nvim/default.nix create mode 100644 modules/plugins/utility/snacks-nvim/snacks-nvim.nix diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 9f05f60a..353eeac1 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -13,6 +13,7 @@ [render-markdown.nvim]: https://github.com/MeanderingProgrammer/render-markdown.nvim [yanky.nvim]: https://github.com/gbprod/yanky.nvim [yazi.nvim]: https://github.com/mikavilpas/yazi.nvim +[snacks.nvim]: https://github.com/folke/snacks.nvim - Add [typst-preview.nvim] under `languages.typst.extensions.typst-preview-nvim`. @@ -62,6 +63,9 @@ - Add [yazi.nvim] as a companion plugin for Yazi, the terminal file manager. +- Add [snacks.nvim] under `vim.utility.snacks-nvim` as a general-purpose utility + plugin. + [amadaluzia](https://github.com/amadaluzia): [haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim diff --git a/modules/plugins/utility/default.nix b/modules/plugins/utility/default.nix index a1574b97..cbe776cc 100644 --- a/modules/plugins/utility/default.nix +++ b/modules/plugins/utility/default.nix @@ -17,6 +17,7 @@ ./nix-develop ./outline ./preview + ./snacks-nvim ./surround ./telescope ./wakatime diff --git a/modules/plugins/utility/snacks-nvim/config.nix b/modules/plugins/utility/snacks-nvim/config.nix new file mode 100644 index 00000000..e726e3e2 --- /dev/null +++ b/modules/plugins/utility/snacks-nvim/config.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.lua) toLuaObject; + inherit (lib.nvim.dag) entryAnywhere; + + cfg = config.vim.utility.snacks-nvim; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["snacks-nvim"]; + pluginRC.snacks-nvim = entryAnywhere '' + require("snacks").setup(${toLuaObject cfg.setupOpts}); + ''; + }; + }; +} diff --git a/modules/plugins/utility/snacks-nvim/default.nix b/modules/plugins/utility/snacks-nvim/default.nix new file mode 100644 index 00000000..8a712baa --- /dev/null +++ b/modules/plugins/utility/snacks-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./snacks-nvim.nix + ]; +} diff --git a/modules/plugins/utility/snacks-nvim/snacks-nvim.nix b/modules/plugins/utility/snacks-nvim/snacks-nvim.nix new file mode 100644 index 00000000..30fd6f89 --- /dev/null +++ b/modules/plugins/utility/snacks-nvim/snacks-nvim.nix @@ -0,0 +1,12 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.utility.snacks-nvim = { + enable = mkEnableOption '' + collection of QoL plugins for Neovim [snacks-nvim] + ''; + + setupOpts = mkPluginSetupOption "snacks-nvim" {}; + }; +} diff --git a/npins/sources.json b/npins/sources.json index 54256514..3e903dc3 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -1989,16 +1989,19 @@ "hash": "0k1xnyvblshn4fhbxgl0i34j22n55xlwr09sdmb23l57br5rb07q" }, "snacks-nvim": { - "type": "Git", + "type": "GitRelease", "repository": { "type": "GitHub", "owner": "folke", "repo": "snacks.nvim" }, - "branch": "main", - "revision": "bc0630e43be5699bb94dadc302c0d21615421d93", - "url": "https://github.com/folke/snacks.nvim/archive/bc0630e43be5699bb94dadc302c0d21615421d93.tar.gz", - "hash": "0a5nw7xa33shag1h12gf930g3vcixbwk8dxv0ji4980ycskh238v" + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "version": "v2.22.0", + "revision": "5eac729fa290248acfe10916d92a5ed5e5c0f9ed", + "url": "https://api.github.com/repos/folke/snacks.nvim/tarball/v2.22.0", + "hash": "1hbm4fnw51qdp0nz83fcxbvnxjq2k57a37w6dp0wz6wkcx7cwxw9" }, "sqls-nvim": { "type": "Git", @@ -2218,4 +2221,4 @@ } }, "version": 3 -} +} \ No newline at end of file From bc978c4fad0645a2cc010783b2f411b8800e9a37 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 17 Mar 2025 11:46:33 +0300 Subject: [PATCH 033/131] diagnostics/nvim-lint: fix invalid setup table call --- .../plugins/diagnostics/nvim-lint/config.nix | 2 +- .../diagnostics/nvim-lint/nvim-lint.nix | 30 +++++++++---------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/modules/plugins/diagnostics/nvim-lint/config.nix b/modules/plugins/diagnostics/nvim-lint/config.nix index dac2c2f4..49517f72 100644 --- a/modules/plugins/diagnostics/nvim-lint/config.nix +++ b/modules/plugins/diagnostics/nvim-lint/config.nix @@ -13,7 +13,7 @@ in { vim = { startPlugins = ["nvim-lint"]; pluginRC.nvim-lint = entryAnywhere '' - require("lint").setup(${toLuaObject cfg.setupOpts}) + require("lint").linters_by_ft(${toLuaObject cfg.linters_by_ft}) ''; }; }; diff --git a/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix b/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix index 2211211e..b08d82be 100644 --- a/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix +++ b/modules/plugins/diagnostics/nvim-lint/nvim-lint.nix @@ -1,27 +1,25 @@ {lib, ...}: let inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) attrsOf listOf str; - inherit (lib.nvim.types) mkPluginSetupOption; in { options.vim.diagnostics.nvim-lint = { enable = mkEnableOption "asynchronous linter plugin for Neovim [nvim-lint]"; - setupOpts = mkPluginSetupOption "nvim-lint" { - linters_by_ft = mkOption { - type = attrsOf (listOf str); - default = {}; - example = { - text = ["vale"]; - markdown = ["vale"]; - }; - description = '' - Map of filetype to formatters. This option takes a set of - `key = value` format where the `value` will be converted - to its Lua equivalent. You are responsible for passing the - correct Nix data types to generate a correct Lua value that - conform is able to accept. - ''; + # nvim-lint does not have a setup table. + linters_by_ft = mkOption { + type = attrsOf (listOf str); + default = {}; + example = { + text = ["vale"]; + markdown = ["vale"]; }; + description = '' + Map of filetype to formatters. This option takes a set of `key = value` + format where the `value` will be converted to its Lua equivalent + through `toLuaObject. You are responsible for passing the correct Nix + data types to generate a correct Lua value that conform is able to + accept. + ''; }; }; } From 0367f490ba978597c979d973098dd795be8bb30d Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 17 Mar 2025 20:25:57 +0300 Subject: [PATCH 034/131] lsp/lspsaga: convert setupOpts format --- docs/release-notes/rl-0.8.md | 3 +++ modules/plugins/lsp/lspsaga/config.nix | 16 ++++++---------- modules/plugins/lsp/lspsaga/lspsaga.nix | 17 +++++++++++++++-- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 353eeac1..278b0a68 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -66,6 +66,9 @@ - Add [snacks.nvim] under `vim.utility.snacks-nvim` as a general-purpose utility plugin. +- Move LSPSaga to `setupOpts` format, allowing freeform configuration in + `vim.lsp.lspsaga.setupOpts`. + [amadaluzia](https://github.com/amadaluzia): [haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim diff --git a/modules/plugins/lsp/lspsaga/config.nix b/modules/plugins/lsp/lspsaga/config.nix index 3af6b7f1..2d2903a6 100644 --- a/modules/plugins/lsp/lspsaga/config.nix +++ b/modules/plugins/lsp/lspsaga/config.nix @@ -4,12 +4,12 @@ ... }: let inherit (lib.modules) mkIf mkMerge; - inherit (lib.strings) optionalString; inherit (lib.nvim.dag) entryAnywhere; inherit (lib.nvim.binds) addDescriptionsToMappings mkSetLuaBinding; + inherit (lib.nvim.lua) toLuaObject; cfg = config.vim.lsp; - self = import ./lspsaga.nix {inherit lib;}; + self = import ./lspsaga.nix {inherit config lib;}; mappingDefinitions = self.options.vim.lsp.lspsaga.mappings; mappings = addDescriptionsToMappings cfg.lspsaga.mappings mappingDefinitions; @@ -18,6 +18,10 @@ in { vim = { startPlugins = ["lspsaga-nvim"]; + pluginRC.lspsaga = entryAnywhere '' + require('lspsaga').init_lsp_saga(${toLuaObject cfg.lspsaga.setupOpts}) + ''; + maps = { visual = mkSetLuaBinding mappings.codeAction "require('lspsaga.codeaction').range_code_action"; normal = mkMerge [ @@ -40,14 +44,6 @@ in { (mkIf (!cfg.lspSignature.enable) (mkSetLuaBinding mappings.signatureHelp "require('lspsaga.signaturehelp').signature_help")) ]; }; - - pluginRC.lspsaga = entryAnywhere '' - require('lspsaga').init_lsp_saga({ - ${optionalString config.vim.ui.borders.plugins.lspsaga.enable '' - border_style = '${config.vim.ui.borders.plugins.lspsaga.style}', - ''} - }) - ''; }; }; } diff --git a/modules/plugins/lsp/lspsaga/lspsaga.nix b/modules/plugins/lsp/lspsaga/lspsaga.nix index f308aaaa..59fea808 100644 --- a/modules/plugins/lsp/lspsaga/lspsaga.nix +++ b/modules/plugins/lsp/lspsaga/lspsaga.nix @@ -1,10 +1,23 @@ -{lib, ...}: let - inherit (lib.options) mkEnableOption; +{ + config, + lib, + ... +}: let + inherit (lib.options) mkOption mkEnableOption; inherit (lib.nvim.binds) mkMappingOption; + inherit (lib.nvim.types) borderType mkPluginSetupOption; in { options.vim.lsp.lspsaga = { enable = mkEnableOption "LSP Saga"; + setupOpts = mkPluginSetupOption "lspsaga" { + border_style = mkOption { + type = borderType; + default = config.vim.ui.borders.globalStyle; + description = "Border type, see {command}`:help nvim_open_win`"; + }; + }; + mappings = { lspFinder = mkMappingOption "LSP Finder [LSPSaga]" "lf"; renderHoveredDoc = mkMappingOption "Rendered hovered docs [LSPSaga]" "lh"; From af26fb3c7da1a8707a9c5c5bf9482cebabdcdbd3 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 17 Mar 2025 20:30:59 +0300 Subject: [PATCH 035/131] docs/custom-plugins: fix invalid backlink to DAG section --- docs/manual/configuring/custom-plugins/configuring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manual/configuring/custom-plugins/configuring.md b/docs/manual/configuring/custom-plugins/configuring.md index c0935f03..5106d29b 100644 --- a/docs/manual/configuring/custom-plugins/configuring.md +++ b/docs/manual/configuring/custom-plugins/configuring.md @@ -67,7 +67,7 @@ of individual sections of configuration as needed. nvf provides helper functions in the extended library, usually under `inputs.nvf.lib.nvim.dag` that you may use. -Please refer to the [DAG section](/index.xhtml#ch-dag-entries) in the nvf manual +Please refer to the [DAG section](#ch-dag-entries) in the nvf manual to find out more about the DAG system. ::: From 93d375af64c5db55e6be86a8bb27323a24b85452 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 18 Mar 2025 12:49:03 +0300 Subject: [PATCH 036/131] minimap/minimap-vim: move code-minimap to `extraPackages` --- modules/plugins/minimap/minimap-vim/config.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/plugins/minimap/minimap-vim/config.nix b/modules/plugins/minimap/minimap-vim/config.nix index 5276a426..a39b9590 100644 --- a/modules/plugins/minimap/minimap-vim/config.nix +++ b/modules/plugins/minimap/minimap-vim/config.nix @@ -10,13 +10,13 @@ cfg = config.vim.minimap.minimap-vim; in { config = mkIf cfg.enable { - vim.startPlugins = [ - pkgs.code-minimap - "minimap-vim" - ]; + vim = { + startPlugins = ["minimap-vim"]; + extraPackages = [pkgs.code-minimap]; - vim.binds.whichKey.register = pushDownDefault { - "m" = "+Minimap"; + binds.whichKey.register = pushDownDefault { + "m" = "+Minimap"; + }; }; }; } From a297acc368f1f56310d422767e277886f3685d7f Mon Sep 17 00:00:00 2001 From: Gerg-L <88247690+Gerg-L@users.noreply.github.com> Date: Tue, 18 Mar 2025 09:51:20 +0000 Subject: [PATCH 037/131] flake: update mnw (#723) --- flake.lock | 6 +++--- modules/wrapper/build/config.nix | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index 72912dee..3ced812a 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ }, "mnw": { "locked": { - "lastModified": 1741647548, - "narHash": "sha256-UqVAeOylufUGIx7BXSneFHD8eI6n0sVwEY2noFENnSE=", + "lastModified": 1742255973, + "narHash": "sha256-XfEGVKatTgEMMOVb4SNp1LYLQOSzzrFTDMVDTZFyMVE=", "owner": "Gerg-L", "repo": "mnw", - "rev": "3fb89e600e26b91d1795cf8a1a34e11e084b4a04", + "rev": "b982dbd5e6d55d4438832b3567c09bc2a129649d", "type": "github" }, "original": { diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index d145f798..3c778169 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -6,9 +6,8 @@ ... }: let inherit (pkgs) vimPlugins; - inherit (lib.strings) isString; - inherit (lib.lists) filter map; - inherit (builtins) path; + inherit (lib.trivial) flip; + inherit (builtins) path filter isString; getPin = name: ((pkgs.callPackages ../../../npins/sources.nix {}) // config.vim.pluginOverrides).${name}; @@ -76,13 +75,6 @@ buildConfigPlugins config.vim.optPlugins ); - # additional Lua and Python3 packages, mapped to their respective functions - # to conform to the format mnw expects. end user should - # only ever need to pass a list of packages, which are modified - # here - extraLuaPackages = ps: map (x: ps.${x}) config.vim.luaPackages; - extraPython3Packages = ps: map (x: ps.${x}) config.vim.python3Packages; - # Wrap the user's desired (unwrapped) Neovim package with arguments that'll be used to # generate a wrapped Neovim package. neovim-wrapped = inputs.mnw.lib.wrap pkgs { @@ -92,9 +84,17 @@ extraBinPath = config.vim.extraPackages; initLua = config.vim.builtLuaConfigRC; luaFiles = config.vim.extraLuaFiles; + providers = { + python3 = { + enable = config.vim.withPython3; + extraPackages = ps: map (flip builtins.getAttr ps) config.vim.python3Packages; + }; + ruby.enable = config.vim.withRuby; + nodeJs.enable = config.vim.withNodeJs; + }; + aliases = lib.optional config.vim.viAlias "vi" ++ lib.optional config.vim.vimAlias "vim"; - inherit (config.vim) viAlias vimAlias withRuby withNodeJs withPython3; - inherit extraLuaPackages extraPython3Packages; + extraLuaPackages = ps: map (flip builtins.getAttr ps) config.vim.luaPackages; }; dummyInit = pkgs.writeText "nvf-init.lua" config.vim.builtLuaConfigRC; From e473a4ddb15090e791b202531e165e969d600b93 Mon Sep 17 00:00:00 2001 From: raf Date: Tue, 18 Mar 2025 09:52:07 +0000 Subject: [PATCH 038/131] lsp/lspsaga: update source; lazyload; remove keybinds (#724) * pins: point lspsaga to new source Stop using the fork, the author is back. * pins: point lspsaga to new source Stop using the fork, the author is back. --- docs/release-notes/rl-0.8.md | 9 +++++ modules/plugins/lsp/lspsaga/config.nix | 45 ++++++------------------- modules/plugins/lsp/lspsaga/lspsaga.nix | 34 +++++++------------ npins/sources.json | 8 ++--- 4 files changed, 36 insertions(+), 60 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 278b0a68..399e2712 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -2,11 +2,18 @@ ## Breaking changes +[Lspsaga documentation]: https://nvimdev.github.io/lspsaga/ + - `git-conflict` keybinds are now prefixed with `` to avoid conflicting with builtins. - `alpha` is now configured with nix, default config removed. +- Lspsaga module no longer ships default keybindings. The keybind format has + been changed by upstream, and old keybindings do not have equivalents under + the new API they provide. Please manually set your keybinds according to + [Lspsaga documentation] following the new API. + [NotAShelf](https://github.com/notashelf): [typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim @@ -69,6 +76,8 @@ - Move LSPSaga to `setupOpts` format, allowing freeform configuration in `vim.lsp.lspsaga.setupOpts`. +- Lazyload Lspsaga and remove default keybindings for it. + [amadaluzia](https://github.com/amadaluzia): [haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim diff --git a/modules/plugins/lsp/lspsaga/config.nix b/modules/plugins/lsp/lspsaga/config.nix index 2d2903a6..811d0178 100644 --- a/modules/plugins/lsp/lspsaga/config.nix +++ b/modules/plugins/lsp/lspsaga/config.nix @@ -3,47 +3,24 @@ lib, ... }: let - inherit (lib.modules) mkIf mkMerge; - inherit (lib.nvim.dag) entryAnywhere; - inherit (lib.nvim.binds) addDescriptionsToMappings mkSetLuaBinding; - inherit (lib.nvim.lua) toLuaObject; + inherit (lib.modules) mkIf mkDefault; cfg = config.vim.lsp; - self = import ./lspsaga.nix {inherit config lib;}; - - mappingDefinitions = self.options.vim.lsp.lspsaga.mappings; - mappings = addDescriptionsToMappings cfg.lspsaga.mappings mappingDefinitions; in { config = mkIf (cfg.enable && cfg.lspsaga.enable) { vim = { - startPlugins = ["lspsaga-nvim"]; + lazy.plugins.lspsaga-nvim = { + package = "lspsaga-nvim"; + setupModule = "lspsaga"; + inherit (cfg.lspsaga) setupOpts; - pluginRC.lspsaga = entryAnywhere '' - require('lspsaga').init_lsp_saga(${toLuaObject cfg.lspsaga.setupOpts}) - ''; - - maps = { - visual = mkSetLuaBinding mappings.codeAction "require('lspsaga.codeaction').range_code_action"; - normal = mkMerge [ - (mkSetLuaBinding mappings.lspFinder "require('lspsaga.provider').lsp_finder") - (mkSetLuaBinding mappings.renderHoveredDoc "require('lspsaga.hover').render_hover_doc") - - (mkSetLuaBinding mappings.smartScrollUp "function() require('lspsaga.action').smart_scroll_with_saga(-1) end") - (mkSetLuaBinding mappings.smartScrollDown "function() require('lspsaga.action').smart_scroll_with_saga(1) end") - - (mkSetLuaBinding mappings.rename "require('lspsaga.rename').rename") - (mkSetLuaBinding mappings.previewDefinition "require('lspsaga.provider').preview_definition") - - (mkSetLuaBinding mappings.showLineDiagnostics "require('lspsaga.diagnostic').show_line_diagnostics") - (mkSetLuaBinding mappings.showCursorDiagnostics "require('lspsaga.diagnostic').show_cursor_diagnostics") - - (mkSetLuaBinding mappings.nextDiagnostic "require('lspsaga.diagnostic').navigate('next')") - (mkSetLuaBinding mappings.previousDiagnostic "require('lspsaga.diagnostic').navigate('prev')") - - (mkSetLuaBinding mappings.codeAction "require('lspsaga.codeaction').code_action") - (mkIf (!cfg.lspSignature.enable) (mkSetLuaBinding mappings.signatureHelp "require('lspsaga.signaturehelp').signature_help")) - ]; + event = ["LspAttach"]; }; + + # Optional dependencies, pretty useful to enhance default functionality of + # Lspsaga. + treesitter.enable = mkDefault true; + visuals.nvim-web-devicons.enable = mkDefault true; }; }; } diff --git a/modules/plugins/lsp/lspsaga/lspsaga.nix b/modules/plugins/lsp/lspsaga/lspsaga.nix index 59fea808..39ce6298 100644 --- a/modules/plugins/lsp/lspsaga/lspsaga.nix +++ b/modules/plugins/lsp/lspsaga/lspsaga.nix @@ -3,10 +3,21 @@ lib, ... }: let + inherit (lib.modules) mkRemovedOptionModule; inherit (lib.options) mkOption mkEnableOption; - inherit (lib.nvim.binds) mkMappingOption; inherit (lib.nvim.types) borderType mkPluginSetupOption; in { + imports = [ + (mkRemovedOptionModule ["vim" "lsp" "lspsaga" "mappings"] '' + Lspsaga mappings have been removed from nvf, as the original author has made + very drastic changes to the API after taking back ownership, and the fork we + used is now archived. Please refer to Lspsaga documentation to add keybinds + for functionality you have used. + + + '') + ]; + options.vim.lsp.lspsaga = { enable = mkEnableOption "LSP Saga"; @@ -17,26 +28,5 @@ in { description = "Border type, see {command}`:help nvim_open_win`"; }; }; - - mappings = { - lspFinder = mkMappingOption "LSP Finder [LSPSaga]" "lf"; - renderHoveredDoc = mkMappingOption "Rendered hovered docs [LSPSaga]" "lh"; - - smartScrollUp = mkMappingOption "Smart scroll up [LSPSaga]" ""; - smartScrollDown = mkMappingOption "Smart scroll up [LSPSaga]" ""; - - rename = mkMappingOption "Rename [LSPSaga]" "lr"; - previewDefinition = mkMappingOption "Preview definition [LSPSaga]" "ld"; - - showLineDiagnostics = mkMappingOption "Show line diagnostics [LSPSaga]" "ll"; - showCursorDiagnostics = mkMappingOption "Show cursor diagnostics [LSPSaga]" "lc"; - - nextDiagnostic = mkMappingOption "Next diagnostic [LSPSaga]" "ln"; - previousDiagnostic = mkMappingOption "Previous diagnostic [LSPSaga]" "lp"; - - codeAction = mkMappingOption "Code action [LSPSaga]" "ca"; - - signatureHelp = mkMappingOption "Signature help [LSPSaga]" "ls"; - }; }; } diff --git a/npins/sources.json b/npins/sources.json index 3e903dc3..91c3f68e 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -717,13 +717,13 @@ "type": "Git", "repository": { "type": "GitHub", - "owner": "tami5", + "owner": "nvimdev", "repo": "lspsaga.nvim" }, "branch": "main", - "revision": "5faeec9f2508d2d49a66c0ac0d191096b4e3fa81", - "url": "https://github.com/tami5/lspsaga.nvim/archive/5faeec9f2508d2d49a66c0ac0d191096b4e3fa81.tar.gz", - "hash": "1bw71db69na2sriv9q167z9bgkir4nwny1bdfv9z606bmng4hhzc" + "revision": "6063935cf68de9aa6dd79f8e1caf5df0a9385de3", + "url": "https://github.com/nvimdev/lspsaga.nvim/archive/6063935cf68de9aa6dd79f8e1caf5df0a9385de3.tar.gz", + "hash": "1pqasjg2f2yd3ci8hyxfqqs7xnkmwdc411dlm6qg1agiv1h8v205" }, "lua-utils-nvim": { "type": "Git", From 71081d084bdf01ff49a3d29f62860483f225be38 Mon Sep 17 00:00:00 2001 From: raf Date: Tue, 18 Mar 2025 14:40:45 +0000 Subject: [PATCH 039/131] completion/nvim-cmp: document default sources; allow override (#725) --- modules/plugins/completion/nvim-cmp/config.nix | 6 ------ modules/plugins/completion/nvim-cmp/nvim-cmp.nix | 16 +++++++++------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/modules/plugins/completion/nvim-cmp/config.nix b/modules/plugins/completion/nvim-cmp/config.nix index ce058876..749ebb7c 100644 --- a/modules/plugins/completion/nvim-cmp/config.nix +++ b/modules/plugins/completion/nvim-cmp/config.nix @@ -60,12 +60,6 @@ in { enableSharedCmpSources = true; nvim-cmp = { - sources = { - nvim-cmp = null; - buffer = "[Buffer]"; - path = "[Path]"; - }; - sourcePlugins = ["cmp-buffer" "cmp-path"]; setupOpts = { diff --git a/modules/plugins/completion/nvim-cmp/nvim-cmp.nix b/modules/plugins/completion/nvim-cmp/nvim-cmp.nix index 0c790455..2c8c77d3 100644 --- a/modules/plugins/completion/nvim-cmp/nvim-cmp.nix +++ b/modules/plugins/completion/nvim-cmp/nvim-cmp.nix @@ -98,14 +98,16 @@ in { sources = mkOption { type = attrsOf (nullOr str); - default = {}; + default = { + nvim-cmp = null; + buffer = "[Buffer]"; + path = "[Path]"; + }; + example = { + nvim-cmp = null; + buffer = "[Buffer]"; + }; description = "The list of sources used by nvim-cmp"; - example = literalExpression '' - { - nvim-cmp = null; - buffer = "[Buffer]"; - } - ''; }; sourcePlugins = mkOption { From a5dee946a9eb749649d17a9d4cd78271600247d0 Mon Sep 17 00:00:00 2001 From: raf Date: Tue, 18 Mar 2025 20:34:34 +0000 Subject: [PATCH 040/131] blink-cmp: apply Nix patch; use new fetcher (#714) * blink-cmp: apply Nix patch; use new fetcher * completion/blink: don't break when modifying built-in sources.providers (#683) * completion/blink-cmp: add missing options **Blink breaks again, 11985891th recorded incident** --------- Co-authored-by: Alfarel --- docs/release-notes/rl-0.8.md | 5 +- flake/legacyPackages/blink-cmp.nix | 22 +++++++-- .../completion/blink-cmp/blink-cmp.nix | 48 ++++++++++++++++--- .../plugins/completion/blink-cmp/config.nix | 19 +++++++- 4 files changed, 80 insertions(+), 14 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 399e2712..c84ef199 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -244,8 +244,9 @@ syncing of nvim shell environment with direnv's. - Add [blink.cmp] source options and some default-disabled sources. - Add [blink.cmp] option to add - [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) so - blink.cmp can source snippets from it. + [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) + so blink.cmp can source snippets from it. +- Fix [blink.cmp] breaking when built-in sources were modified. [TheColorman](https://github.com/TheColorman): diff --git a/flake/legacyPackages/blink-cmp.nix b/flake/legacyPackages/blink-cmp.nix index 924cb4cc..ba1d7424 100644 --- a/flake/legacyPackages/blink-cmp.nix +++ b/flake/legacyPackages/blink-cmp.nix @@ -5,6 +5,7 @@ git, src, version, + fetchpatch, }: let blink-fuzzy-lib = rustPlatform.buildRustPackage { pname = "blink-fuzzy-lib"; @@ -13,11 +14,10 @@ # TODO: remove this if plugin stops using nightly rust env.RUSTC_BOOTSTRAP = true; + useFetchCargoVendor = true; + cargoHash = "sha256-F1wh/TjYoiIbDY3J/prVF367MKk3vwM7LqOpRobOs7I="; + nativeBuildInputs = [git]; - cargoLock = { - lockFile = "${src}/Cargo.lock"; - allowBuiltinFetchGit = true; - }; }; libExt = @@ -34,5 +34,19 @@ in preInstall = '' mkdir -p target/release ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy.${libExt} target/release/libblink_cmp_fuzzy.${libExt} + echo -n "nix" > target/release/version ''; + + # Borrowed from nixpkgs + # TODO: Remove this patch when updating to next version + patches = [ + (fetchpatch { + name = "blink-add-bypass-for-nix.patch"; + url = "https://github.com/Saghen/blink.cmp/commit/6c83ef1ae34abd7ef9a32bfcd9595ac77b61037c.diff?full_index=1"; + hash = "sha256-304F1gDDKVI1nXRvvQ0T1xBN+kHr3jdmwMMp8CNl+GU="; + }) + ]; + + # Module for reproducing issues + nvimSkipModule = ["repro"]; } diff --git a/modules/plugins/completion/blink-cmp/blink-cmp.nix b/modules/plugins/completion/blink-cmp/blink-cmp.nix index 4290e1cb..f5e38ed1 100644 --- a/modules/plugins/completion/blink-cmp/blink-cmp.nix +++ b/modules/plugins/completion/blink-cmp/blink-cmp.nix @@ -1,6 +1,6 @@ {lib, ...}: let inherit (lib.options) mkEnableOption mkOption literalMD; - inherit (lib.types) listOf str either attrsOf submodule enum anything int nullOr; + inherit (lib.types) bool listOf str either attrsOf submodule enum anything int nullOr; inherit (lib.generators) mkLuaInline; inherit (lib.nvim.types) mkPluginSetupOption luaInline pluginType; inherit (lib.nvim.binds) mkMappingOption; @@ -21,8 +21,9 @@ freeformType = anything; options = { module = mkOption { - type = str; - description = "module of the provider"; + type = nullOr str; + default = null; + description = "Provider module."; }; }; }; @@ -40,7 +41,7 @@ in { providers = mkOption { type = attrsOf providerType; default = {}; - description = "Settings for completion providers"; + description = "Settings for completion providers."; }; transform_items = mkOption { @@ -63,6 +64,12 @@ in { default = []; description = "List of sources to enable for cmdline. Null means use default source list."; }; + + keymap = mkOption { + type = keymapType; + default = {}; + description = "blink.cmp cmdline keymap"; + }; }; completion = { @@ -74,6 +81,16 @@ in { description = "Delay before auto show triggers"; }; }; + + menu.auto_show = mkOption { + type = bool; + default = true; + description = '' + Manages the appearance of the completion menu. You may prevent the menu + from automatically showing by this option to `false` and manually showing + it with the show keymap command. + ''; + }; }; keymap = mkOption { @@ -103,7 +120,25 @@ in { fuzzy = { prebuilt_binaries = { download = mkBool false '' - Auto-downloads prebuilt binaries. Do not enable, it doesn't work on nix + Auto-downloads prebuilt binaries. + + ::: .{warning} + Do not enable this option, as it does **not work** on Nix! + ::: + ''; + }; + + implementation = mkOption { + type = enum ["lua" "prefer_rust" "rust" "prefer_rust_with_warning"]; + default = "prefer_rust"; + description = '' + fuzzy matcher implementation for Blink. + + * `"lua"`: slower, Lua native fuzzy matcher implementation + * `"rust": use the SIMD fuzzy matcher, 'frizbee' + * `"prefer_rust"`: use the rust implementation, but fall back to lua + * `"prefer_rust_with_warning"`: use the rust implementation, and fall back to lua + if it is not available after emitting a warning. ''; }; }; @@ -122,12 +157,14 @@ in { sourcePlugins = let sourcePluginType = submodule { options = { + enable = mkEnableOption "this source"; package = mkOption { type = pluginType; description = '' `blink-cmp` source plugin package. ''; }; + module = mkOption { type = str; description = '' @@ -136,7 +173,6 @@ in { Should be present in the source's documentation. ''; }; - enable = mkEnableOption "this source"; }; }; in diff --git a/modules/plugins/completion/blink-cmp/config.nix b/modules/plugins/completion/blink-cmp/config.nix index 875a4fd4..9302332e 100644 --- a/modules/plugins/completion/blink-cmp/config.nix +++ b/modules/plugins/completion/blink-cmp/config.nix @@ -6,8 +6,8 @@ inherit (lib.modules) mkIf; inherit (lib.strings) optionalString; inherit (lib.generators) mkLuaInline; - inherit (lib.attrsets) attrValues filterAttrs; - inherit (lib.lists) map optional; + inherit (lib.attrsets) attrValues filterAttrs mapAttrsToList; + inherit (lib.lists) map optional elem; inherit (lib.nvim.lua) toLuaObject; inherit (builtins) concatStringsSep typeOf tryEval attrNames mapAttrs; @@ -24,7 +24,22 @@ enabledBlinkSources = filterAttrs (_source: definition: definition.enable) cfg.sourcePlugins; blinkSourcePlugins = map (definition: definition.package) (attrValues enabledBlinkSources); + + blinkBuiltins = [ + "path" + "lsp" + "snippets" + "buffer" + "omni" + ]; in { + assertions = + mapAttrsToList (provider: definition: { + assertion = elem provider blinkBuiltins || definition.module != null; + message = "`config.vim.autocomplete.blink-cmp.setupOpts.sources.providers.${provider}.module` is `null`: non-builtin providers must set `module`."; + }) + cfg.setupOpts.sources.providers; + vim = mkIf cfg.enable { startPlugins = ["blink-compat"] ++ blinkSourcePlugins ++ (optional cfg.friendly-snippets.enable "friendly-snippets"); lazy.plugins = { From d8a56fc5f59fce2c470c059d9810ddeb107528ec Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 20 Mar 2025 14:39:53 +0300 Subject: [PATCH 041/131] meta: update CODEOWNERS with new maintainers --- .github/CODEOWNERS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index de6ff5ef..2fb071ca 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,5 @@ -* @NotAShelf +# Codeowners should be used to distinguish the maintainers of the project +# and not contributors of specific modules to nvf. While adding a new module +# please consider adding yourself to 'meta.maintainers' in the module instead +# of CODEOWNERS here. +* @NotAShelf @horriblename @Soliprem From 3a28d05684f7f4e314eb4e56a5af624b648ab278 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Mar 2025 11:44:49 +0000 Subject: [PATCH 042/131] build(deps): bump beatlabs/delete-old-branches-action (#729) Bumps [beatlabs/delete-old-branches-action](https://github.com/beatlabs/delete-old-branches-action) from 0.0.10 to 0.0.11. - [Release notes](https://github.com/beatlabs/delete-old-branches-action/releases) - [Commits](https://github.com/beatlabs/delete-old-branches-action/compare/v0.0.10...v0.0.11) --- updated-dependencies: - dependency-name: beatlabs/delete-old-branches-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cleanup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 204dcba7..fbc12bc1 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v4 - name: "Delete old branches" - uses: beatlabs/delete-old-branches-action@v0.0.10 + uses: beatlabs/delete-old-branches-action@v0.0.11 with: repo_token: "${{ secrets.GITHUB_TOKEN }}" date: "1 months ago" From 60c3a2ff1e2a30d1b245592da84f231098d4ec75 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang <59727193+horriblename@users.noreply.github.com> Date: Sat, 22 Mar 2025 17:57:21 +0100 Subject: [PATCH 043/131] nvim-lint: fix config syntax (#735) --- modules/plugins/diagnostics/nvim-lint/config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/diagnostics/nvim-lint/config.nix b/modules/plugins/diagnostics/nvim-lint/config.nix index 49517f72..085140dc 100644 --- a/modules/plugins/diagnostics/nvim-lint/config.nix +++ b/modules/plugins/diagnostics/nvim-lint/config.nix @@ -13,7 +13,7 @@ in { vim = { startPlugins = ["nvim-lint"]; pluginRC.nvim-lint = entryAnywhere '' - require("lint").linters_by_ft(${toLuaObject cfg.linters_by_ft}) + require("lint").linters_by_ft = ${toLuaObject cfg.linters_by_ft} ''; }; }; From 58021beb1c952c55feb693c1469dd9e9c9c9e7a5 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 22 Mar 2025 15:01:51 +0100 Subject: [PATCH 044/131] lazy: fix incomplete event type --- modules/wrapper/lazy/lazy.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wrapper/lazy/lazy.nix b/modules/wrapper/lazy/lazy.nix index 5d67aa59..eb1f5cdf 100644 --- a/modules/wrapper/lazy/lazy.nix +++ b/modules/wrapper/lazy/lazy.nix @@ -126,7 +126,7 @@ }; event = mkOption { - type = nullOr (oneOf [str (listOf str) lznEvent]); + type = nullOr (oneOf [str lznEvent (listOf (either str lznEvent))]); default = null; description = "Lazy-load on event"; }; From e2d10e8fb20c8a366a23bcd97535ecd3b3b940c8 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 22 Mar 2025 15:02:13 +0100 Subject: [PATCH 045/131] lazy: create LazyFile user event --- modules/wrapper/lazy/config.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/wrapper/lazy/config.nix b/modules/wrapper/lazy/config.nix index 3468d5ec..c1bd8829 100644 --- a/modules/wrapper/lazy/config.nix +++ b/modules/wrapper/lazy/config.nix @@ -134,6 +134,15 @@ in { startPlugins = ["lz-n" "lzn-auto-require"]; optPlugins = pluginPackages; + augroups = [{name = "nvf_lazy_file_hooks";}]; + autocmds = [ + { + event = ["BufReadPost" "BufNewFile" "BufWritePre"]; + group = "nvf_lazy_file_hooks"; + command = "doautocmd User LazyFile"; + once = true; + } + ]; lazy.builtLazyConfig = '' require('lz.n').load(${toLuaObject lznSpecs}) From c639cf50646abc67f87231654c49d749c8b16135 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 22 Mar 2025 15:02:40 +0100 Subject: [PATCH 046/131] copilot: load on LazyFile --- modules/plugins/assistant/copilot/config.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/plugins/assistant/copilot/config.nix b/modules/plugins/assistant/copilot/config.nix index 37da046f..525fe3bd 100644 --- a/modules/plugins/assistant/copilot/config.nix +++ b/modules/plugins/assistant/copilot/config.nix @@ -37,6 +37,12 @@ in { inherit (cfg) setupOpts; after = mkIf cfg.cmp.enable "require('copilot_cmp').setup()"; + event = [ + { + event = "User"; + pattern = "LazyFile"; + } + ]; cmd = ["Copilot" "CopilotAuth" "CopilotDetach" "CopilotPanel" "CopilotStop"]; keys = [ (mkLuaKeymap ["n"] cfg.mappings.panel.accept (wrapPanelBinding ''require("copilot.panel").accept'' cfg.mappings.panel.accept) "[copilot] Accept suggestion" {}) From 5f99c7f4e5cd7db5a3d0ef3e56b0beb75411f93a Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 22 Mar 2025 15:07:27 +0100 Subject: [PATCH 047/131] docs: update release notes --- docs/release-notes/rl-0.8.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index c84ef199..e1c1f38f 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -89,6 +89,7 @@ [blink.cmp]: https://github.com/saghen/blink.cmp - Add [blink.cmp] support. +- Add `LazyFile` user event. [diniamo](https://github.com/diniamo): @@ -244,8 +245,8 @@ syncing of nvim shell environment with direnv's. - Add [blink.cmp] source options and some default-disabled sources. - Add [blink.cmp] option to add - [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) - so blink.cmp can source snippets from it. + [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) so + blink.cmp can source snippets from it. - Fix [blink.cmp] breaking when built-in sources were modified. [TheColorman](https://github.com/TheColorman): From d105f699219954d973a9f56c60b1be120b67fde4 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 22 Mar 2025 15:13:44 +0100 Subject: [PATCH 048/131] docs: mention LazyFile --- .../configuring/custom-plugins/lazy-method.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/manual/configuring/custom-plugins/lazy-method.md b/docs/manual/configuring/custom-plugins/lazy-method.md index c6fd7106..ae766535 100644 --- a/docs/manual/configuring/custom-plugins/lazy-method.md +++ b/docs/manual/configuring/custom-plugins/lazy-method.md @@ -38,3 +38,22 @@ As of version **0.7**, we exposed an API for configuring lazy-loaded plugins via }; } ``` + +## LazyFile event {#sec-lazyfile-event} + +You can use the `LazyFile` user event to load a plugin when a file is opened: + +```nix +{ + config.vim.lazy.plugins = { + "aerial.nvim" = { + package = pkgs.vimPlugins.aerial-nvim; + event = [{event = "User"; pattern = "LazyFile";}]; + # ... + }; + }; +} +``` + +You can consider `LazyFile` as an alias to +`["BufReadPost" "BufNewFile" "BufWritePre"]` From 7696f470a7ccd23fa12875256779032d0aa43cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Phan=20=C4=90=C4=83ng=20Khoa?= Date: Sun, 23 Mar 2025 22:57:38 +0700 Subject: [PATCH 049/131] eslint_d: added conditions for launching eslint_d (#737) * eslint_d: added conditions for launching eslint_d * eslint_d: documented changes to docs/release-notes/rl-0.8.md --------- Co-authored-by: raf --- docs/release-notes/rl-0.8.md | 4 ++++ modules/plugins/languages/astro.nix | 10 ++++++++++ modules/plugins/languages/svelte.nix | 10 ++++++++++ modules/plugins/languages/ts.nix | 10 ++++++++++ 4 files changed, 34 insertions(+) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index c84ef199..32a8c28e 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -271,3 +271,7 @@ [Butzist](https://github.com/butzist): - Add Helm chart support under `vim.languages.helm`. + +[rice-cracker-dev](https://github.com/rice-cracker-dev): + +- `eslint_d` now checks for configuration files to load. diff --git a/modules/plugins/languages/astro.nix b/modules/plugins/languages/astro.nix index 9e70424b..d5672af0 100644 --- a/modules/plugins/languages/astro.nix +++ b/modules/plugins/languages/astro.nix @@ -72,6 +72,16 @@ ls_sources, null_ls.builtins.diagnostics.eslint_d.with({ command = "${getExe pkg}", + condition = function(utils) + return utils.root_has_file({ + "eslint.config.js", + "eslint.config.mjs", + ".eslintrc", + ".eslintrc.json", + ".eslintrc.js", + ".eslintrc.yml", + }) + end, }) ) ''; diff --git a/modules/plugins/languages/svelte.nix b/modules/plugins/languages/svelte.nix index a3c55e10..4d96c20a 100644 --- a/modules/plugins/languages/svelte.nix +++ b/modules/plugins/languages/svelte.nix @@ -72,6 +72,16 @@ ls_sources, null_ls.builtins.diagnostics.eslint_d.with({ command = "${getExe pkg}", + condition = function(utils) + return utils.root_has_file({ + "eslint.config.js", + "eslint.config.mjs", + ".eslintrc", + ".eslintrc.json", + ".eslintrc.js", + ".eslintrc.yml", + }) + end, }) ) ''; diff --git a/modules/plugins/languages/ts.nix b/modules/plugins/languages/ts.nix index c9070554..790c235a 100644 --- a/modules/plugins/languages/ts.nix +++ b/modules/plugins/languages/ts.nix @@ -123,6 +123,16 @@ ls_sources, null_ls.builtins.diagnostics.eslint_d.with({ command = "${getExe pkg}", + condition = function(utils) + return utils.root_has_file({ + "eslint.config.js", + "eslint.config.mjs", + ".eslintrc", + ".eslintrc.json", + ".eslintrc.js", + ".eslintrc.yml", + }) + end, }) ) ''; From ac59df1bc91b6e1f7f5c7847de73b2e4a8731557 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 24 Mar 2025 08:43:04 +0300 Subject: [PATCH 050/131] treewide: remove `nmd` dependency --- docs/default.nix | 2 -- flake.lock | 17 ----------------- flake.nix | 6 ------ modules/plugins/statusline/lualine/lualine.nix | 2 -- 4 files changed, 27 deletions(-) diff --git a/docs/default.nix b/docs/default.nix index 48cff563..98b29db0 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -95,8 +95,6 @@ inherit (nvimModuleDocs) optionsJSON; }; in { - inherit (inputs) nmd; - # TODO: Use `hmOptionsDocs.optionsJSON` directly once upstream # `nixosOptionsDoc` is more customizable. options.json = diff --git a/flake.lock b/flake.lock index 3ced812a..603d0f50 100644 --- a/flake.lock +++ b/flake.lock @@ -106,22 +106,6 @@ "type": "github" } }, - "nmd": { - "flake": false, - "locked": { - "lastModified": 1705050560, - "narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=", - "owner": "~rycee", - "repo": "nmd", - "rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3", - "type": "sourcehut" - }, - "original": { - "owner": "~rycee", - "repo": "nmd", - "type": "sourcehut" - } - }, "root": { "inputs": { "flake-parts": "flake-parts", @@ -129,7 +113,6 @@ "mnw": "mnw", "nil": "nil", "nixpkgs": "nixpkgs", - "nmd": "nmd", "systems": "systems_2" } }, diff --git a/flake.nix b/flake.nix index 30b71f80..6e716581 100644 --- a/flake.nix +++ b/flake.nix @@ -86,12 +86,6 @@ # Alternate neovim-wrapper mnw.url = "github:Gerg-L/mnw"; - # For generating documentation website - nmd = { - url = "sourcehut:~rycee/nmd"; - flake = false; - }; - # Language servers (use master instead of nixpkgs) nil = { url = "github:oxalica/nil"; diff --git a/modules/plugins/statusline/lualine/lualine.nix b/modules/plugins/statusline/lualine/lualine.nix index 9943f78e..bf070db7 100644 --- a/modules/plugins/statusline/lualine/lualine.nix +++ b/modules/plugins/statusline/lualine/lualine.nix @@ -124,8 +124,6 @@ in { mkOption { type = enum themesConcatted; default = "auto"; - # TODO: xml generation error if the closing '' is on a new line. - # issue: https://gitlab.com/rycee/nmd/-/issues/10 defaultText = ''`config.vim.theme.name` if theme supports lualine else "auto"''; description = "Theme for lualine"; }; From df1b3f796831d942b6e405355bdc5a3637429c0a Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 24 Mar 2025 11:57:38 +0300 Subject: [PATCH 051/131] blink: v0.13.1 -> v0.14.1 --- flake/legacyPackages/blink-cmp.nix | 24 +++++------------------- npins/sources.json | 8 ++++---- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/flake/legacyPackages/blink-cmp.nix b/flake/legacyPackages/blink-cmp.nix index ba1d7424..477616aa 100644 --- a/flake/legacyPackages/blink-cmp.nix +++ b/flake/legacyPackages/blink-cmp.nix @@ -1,11 +1,11 @@ { + stdenv, rustPlatform, hostPlatform, vimUtils, git, src, version, - fetchpatch, }: let blink-fuzzy-lib = rustPlatform.buildRustPackage { pname = "blink-fuzzy-lib"; @@ -19,11 +19,6 @@ nativeBuildInputs = [git]; }; - - libExt = - if hostPlatform.isDarwin - then "dylib" - else "so"; in vimUtils.buildVimPlugin { pname = "blink-cmp"; @@ -31,22 +26,13 @@ in # blink references a repro.lua which is placed outside the lua/ directory doCheck = false; - preInstall = '' + preInstall = let + ext = stdenv.hostPlatform.extensions.sharedLibrary; + in '' mkdir -p target/release - ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy.${libExt} target/release/libblink_cmp_fuzzy.${libExt} - echo -n "nix" > target/release/version + ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy${ext} target/release/libblink_cmp_fuzzy${ext} ''; - # Borrowed from nixpkgs - # TODO: Remove this patch when updating to next version - patches = [ - (fetchpatch { - name = "blink-add-bypass-for-nix.patch"; - url = "https://github.com/Saghen/blink.cmp/commit/6c83ef1ae34abd7ef9a32bfcd9595ac77b61037c.diff?full_index=1"; - hash = "sha256-304F1gDDKVI1nXRvvQ0T1xBN+kHr3jdmwMMp8CNl+GU="; - }) - ]; - # Module for reproducing issues nvimSkipModule = ["repro"]; } diff --git a/npins/sources.json b/npins/sources.json index 91c3f68e..53cb810e 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -46,10 +46,10 @@ "pre_releases": false, "version_upper_bound": null, "release_prefix": null, - "version": "v0.13.1", - "revision": "29861baf37bbb16f5dbf524a6edac5daaad6f4fc", - "url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v0.13.1", - "hash": "1y5p7i6g884r65mhfsazx28g0qs37hc57jm37i7kch9kcf8m7sbq" + "version": "v0.14.1", + "revision": "7a91dc584f41f5aa2373a917faf8100b2e54d6c9", + "url": "https://api.github.com/repos/saghen/blink.cmp/tarball/v0.14.1", + "hash": "0zm6s3v9liimx28vs1g5yi7bcfrl691q81bvzmdpavcwrzcdb0c8" }, "blink-cmp-spell": { "type": "Git", From 9074c734b7d515b23d80dee32105e332e3055d09 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Mon, 24 Mar 2025 21:09:47 +0300 Subject: [PATCH 052/131] docs: update co-maintainers section --- .github/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/README.md b/.github/README.md index 7c0974c3..a6ef7a44 100644 --- a/.github/README.md +++ b/.github/README.md @@ -246,14 +246,15 @@ Neovim's behaviour with Nix. ### Co-Maintainers -Alongside myself, nvf is developed by those talented folk: +Alongside [myself](https://github.com/notashelf), nvf is developed by those +talented folk. nvf would not be what it is today without their invaluable +contributions. - [**@horriblename**](https://github.com/horriblename) ([Liberapay](https://liberapay.com/horriblename/))- For actively implementing planned features and quality of life updates. -- [**@Diniamo**](https://github.com/Diniamo) - ([Liberapay](https://en.liberapay.com/diniamo/)) - For actively submitting - pull requests, issues and assistance with maintenance of nvf. +- [**@Soliprem**](https://github.com/soliprem) - For rigorously implementing + missing features and excellent work on new language modules. Please do remember to extend your thanks (financially or otherwise) if this project has been helpful to you. @@ -270,14 +271,14 @@ heart-felt thanks to - [**@FlafyDev**](https://github.com/FlafyDev) - For getting Home-Manager module to work and Nix assistance. - [**@n3oney**](https://github.com/n3oney) - For making custom keybinds finally - possible, and other module additions. + possible, great ideas and module additions. - [**@Yavko**](https://github.com/Yavko) - For the amazing **nvf** logo - [**@FrothyMarrow**](https://github.com/FrothyMarrow) - For seeing mistakes - that I could not. + that I could not and contributing good ideas & code. - [**@Gerg-l**](https://github.com/gerg-l) 🐸 - For the modern Neovim wrapper, - [mnw], and occasional code improvements. -- [**@Soliprem**](https://github.com/soliprem) - Rigorously implementing missing - features and excellent work on new language modules. + [mnw], and occasional improvements to the codebase. +- [**@Diniamo**](https://github.com/Diniamo) - For actively submitting pull + requests, issues and assistance with co-maintenance of nvf. and everyone who has submitted issues or pull requests! @@ -301,7 +302,6 @@ including: I am grateful for their previous work and inspiration, and I wholeheartedly recommend checking their work out. -
## License From 9f8b7edbf6d2c842c361c863aba633f1d7a17d72 Mon Sep 17 00:00:00 2001 From: Marlon Rosenberg Date: Mon, 24 Mar 2025 22:25:01 +0100 Subject: [PATCH 053/131] languages/fsharp: init --- docs/manual/configuring/languages.md | 1 + docs/release-notes/rl-0.8.md | 4 + modules/plugins/languages/default.nix | 1 + modules/plugins/languages/fsharp.nix | 108 ++++++++++++++++++++++++++ 4 files changed, 114 insertions(+) create mode 100644 modules/plugins/languages/fsharp.nix diff --git a/docs/manual/configuring/languages.md b/docs/manual/configuring/languages.md index 74714365..252163fb 100644 --- a/docs/manual/configuring/languages.md +++ b/docs/manual/configuring/languages.md @@ -19,6 +19,7 @@ formatting to diagnostics. The following languages have sections under the - Go: [vim.languages.go.enable](#opt-vim.languages.go.enable) - Lua: [vim.languages.lua.enable](#opt-vim.languages.lua.enable) - PHP: [vim.languages.php.enable](#opt-vim.languages.php.enable) +- F#: [vim.languages.fsharp.enable](#opt-vim.languages.fsharp.enable) Adding support for more languages, and improving support for existing ones are great places where you can contribute with a PR. diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 5e09bb35..afb5ccd3 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -276,3 +276,7 @@ [rice-cracker-dev](https://github.com/rice-cracker-dev): - `eslint_d` now checks for configuration files to load. + +[Sc3l3t0n](https://github.com/Sc3l3t0n) + +- Add F# support under `vim.languages.fsharp`. diff --git a/modules/plugins/languages/default.nix b/modules/plugins/languages/default.nix index 20acfb6c..c3312135 100644 --- a/modules/plugins/languages/default.nix +++ b/modules/plugins/languages/default.nix @@ -10,6 +10,7 @@ in { ./clang.nix ./css.nix ./elixir.nix + ./fsharp.nix ./gleam.nix ./go.nix ./hcl.nix diff --git a/modules/plugins/languages/fsharp.nix b/modules/plugins/languages/fsharp.nix new file mode 100644 index 00000000..2b80bf11 --- /dev/null +++ b/modules/plugins/languages/fsharp.nix @@ -0,0 +1,108 @@ +{ + lib, + pkgs, + config, + ... +}: let + inherit (builtins) attrNames; + inherit (lib.options) mkEnableOption mkOption; + inherit (lib.types) either listOf package str enum; + inherit (lib.modules) mkIf mkMerge; + inherit (lib.lists) isList; + inherit (lib.nvim.types) mkGrammarOption; + inherit (lib.nvim.lua) expToLua; + + defaultServer = "fsautocomplete"; + servers = { + fsautocomplete = { + package = pkgs.fsautocomplete; + internalFormatter = false; + lspConfig = '' + lspconfig.fsautocomplete.setup { + capabilities = capabilities; + on_attach = default_on_attach; + cmd = ${ + if isList cfg.lsp.package + then expToLua cfg.lsp.package + else "{'${cfg.lsp.package}/bin/fsautocomplete'}" + }, + } + ''; + }; + }; + + defaultFormat = "fantomas"; + formats = { + fantomas = { + package = pkgs.fantomas; + nullConfig = '' + table.insert( + ls_sources, + null_ls.builtins.formatting.fantomas.with({ + command = "${cfg.format.package}/bin/fantomas", + }) + ) + ''; + }; + }; + + cfg = config.vim.languages.fsharp; +in { + options = { + vim.languages.fsharp = { + enable = mkEnableOption "F# language support"; + + treesitter = { + enable = mkEnableOption "F# treesitter" // {default = config.vim.languages.enableTreesitter;}; + package = mkGrammarOption pkgs "fsharp"; + }; + + lsp = { + enable = mkEnableOption "F# LSP support" // {default = config.vim.languages.enableLSP;}; + server = mkOption { + description = "F# LSP server to use"; + type = enum (attrNames servers); + default = defaultServer; + }; + + package = mkOption { + description = "F# LSP server package, or the command to run as a list of strings"; + type = either package (listOf str); + default = servers.${cfg.lsp.server}.package; + }; + }; + format = { + enable = mkEnableOption "F# formatting" // {default = config.vim.languages.enableFormat;}; + + type = mkOption { + description = "F# formatter to use"; + type = enum (attrNames formats); + default = defaultFormat; + }; + + package = mkOption { + description = "F# formatter package"; + type = package; + default = formats.${cfg.format.type}.package; + }; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + (mkIf cfg.treesitter.enable { + vim.treesitter.enable = true; + vim.treesitter.grammars = [cfg.treesitter.package]; + }) + + (mkIf cfg.lsp.enable { + vim.lsp.lspconfig.enable = true; + vim.lsp.lspconfig.sources.fsharp-lsp = servers.${cfg.lsp.server}.lspConfig; + }) + + (mkIf cfg.format.enable { + vim.lsp.null-ls.enable = true; + vim.lsp.null-ls.sources.fsharp-format = formats.${cfg.format.type}.nullConfig; + }) + ]); +} From 7835cbdc1da7785dca4cb1b2123157b7712109c8 Mon Sep 17 00:00:00 2001 From: Al Duncanson Date: Mon, 24 Mar 2025 19:04:23 -0400 Subject: [PATCH 054/131] docs: fix typo Add missing word in sentence: `let`. --- docs/manual/options.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/manual/options.md b/docs/manual/options.md index 61282dfa..beab4f16 100644 --- a/docs/manual/options.md +++ b/docs/manual/options.md @@ -5,8 +5,8 @@ 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. +which you can access with `man 5 nvf`. Please let us know if you believe any of +the options below are missing useful examples.