diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 3ceef93f..a265c7cf 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -149,3 +149,11 @@ [nezia1](https://github.com/nezia1) - Add support for [nixd](https://github.com/nix-community/nixd) language server. + +[folospior](https://github.com/folospior) + +- Fix plugin name for lsp/lspkind. +[iynaix](https://github.com/iynaix) + +- Add lsp options support for [nixd](https://github.com/nix-community/nixd) + language server. diff --git a/modules/plugins/languages/nix.nix b/modules/plugins/languages/nix.nix index d6ca6d32..1ae2693e 100644 --- a/modules/plugins/languages/nix.nix +++ b/modules/plugins/languages/nix.nix @@ -10,9 +10,9 @@ inherit (lib.modules) mkIf mkMerge; inherit (lib.lists) isList; inherit (lib.strings) optionalString; - inherit (lib.types) enum either listOf package str; + inherit (lib.types) anything attrsOf enum either listOf nullOr package str; inherit (lib.nvim.types) mkGrammarOption diagnostics; - inherit (lib.nvim.lua) expToLua; + inherit (lib.nvim.lua) expToLua toLuaObject; inherit (lib.nvim.languages) diagnosticsToLua; cfg = config.vim.languages.nix; @@ -87,6 +87,7 @@ command = {"${cfg.format.package}/bin/nixfmt"}, }, ''} + options = ${toLuaObject cfg.lsp.options}, }, }, ''} @@ -173,6 +174,12 @@ in { type = either package (listOf str); default = servers.${cfg.lsp.server}.package; }; + + options = mkOption { + type = nullOr (attrsOf anything); + default = null; + description = "Options to pass to nixd LSP server"; + }; }; format = { diff --git a/modules/plugins/lsp/lspkind/config.nix b/modules/plugins/lsp/lspkind/config.nix index abe14524..982caff2 100644 --- a/modules/plugins/lsp/lspkind/config.nix +++ b/modules/plugins/lsp/lspkind/config.nix @@ -25,7 +25,7 @@ in { ]; vim = { - startPlugins = ["lspkind"]; + startPlugins = ["lspkind-nvim"]; lsp.lspkind.setupOpts.before = config.vim.autocomplete.nvim-cmp.format; autocomplete = {