diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index d5de83b3..1f36e37b 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -301,7 +301,6 @@ - Add more applicable filetypes to illuminate denylist. - Disable mini.indentscope for applicable filetypes. - Fix fzf-lua having a hard dependency on fzf. -- Enable inlay hints support - `config.vim.lsp.inlayHints`. [tebuevd](https://github.com/tebuevd): diff --git a/modules/neovim/init/diagnostics.nix b/modules/neovim/init/diagnostics.nix index 18717edf..26ca6e84 100644 --- a/modules/neovim/init/diagnostics.nix +++ b/modules/neovim/init/diagnostics.nix @@ -12,70 +12,63 @@ cfg = config.vim.diagnostics; - # Takes a boolean, a table, or a Lua list ({key = value}). We - # would like to allow all of those types, while clearly expressing - # them in the option's type. As such, this type is what it is. diagnosticType = oneOf [(attrsOf anything) bool luaInline]; diagnosticsSubmodule = submodule { - # The table might need to be extended, so let's allow that case - # with a freeform type of what is supported by diagnostics opts. freeformType = attrsOf diagnosticType; - options = { - underline = mkOption { - type = diagnosticType; - default = true; - description = "Use underline for diagnostics."; - }; + underline = mkOption { + type = diagnosticType; + default = true; + description = "Use underline for diagnostics."; + }; - virtual_text = mkOption { - type = diagnosticType; - default = false; - example = literalExpression '' - { - format = lib.generators.mkLuaInline ''' - function(diagnostic) - return string.format("%s (%s)", diagnostic.message, diagnostic.source) - end - '''; - } - ''; + virtual_text = mkOption { + type = diagnosticType; + default = false; + example = literalExpression '' + { + format = lib.generators.mkLuaInline ''' + function(diagnostic) + return string.format("%s (%s)", diagnostic.message, diagnostic.source) + end + '''; + } + ''; - description = '' - Use virtual text for diagnostics. If multiple diagnostics are set for a namespace, - one prefix per diagnostic + the last diagnostic message are shown. - ''; - }; + description = '' + Use virtual text for diagnostics. If multiple diagnostics are set for a namespace, + one prefix per diagnostic + the last diagnostic message are shown. + ''; + }; - virtual_lines = mkOption { - type = diagnosticType; - default = false; - description = '' - Use virtual lines for diagnostics. - ''; - }; + virtual_lines = mkOption { + type = diagnosticType; + default = false; + description = '' + Use virtual lines for diagnostics. + ''; + }; - signs = mkOption { - type = diagnosticType; - default = false; - example = { - signs.text = { - "vim.diagnostic.severity.ERROR" = "󰅚 "; - "vim.diagnostic.severity.WARN" = "󰀪 "; - }; + signs = mkOption { + type = diagnosticType; + default = false; + example = { + signs.text = { + "vim.diagnostic.severity.ERROR" = "󰅚 "; + "vim.diagnostic.severity.WARN" = "󰀪 "; }; - description = '' - Use signs for diagnostics. See {command}`:help diagnostic-signs`. - ''; }; + description = '' + Use signs for diagnostics. See {command}`:help diagnostic-signs`. + ''; + }; - update_in_insert = mkOption { - type = bool; - default = false; - description = '' - Update diagnostics in Insert mode. If `false`, diagnostics will - be updated on InsertLeave ({command}`:help InsertLeave`). - ''; - }; + update_in_insert = mkOption { + type = bool; + default = false; + description = '' + Update diagnostics in Insert mode. If `false`, diagnostics will + be updated on InsertLeave ({command}`:help InsertLeave`). + ''; }; }; in { diff --git a/modules/plugins/lsp/config.nix b/modules/plugins/lsp/config.nix index 3702ac5f..0fa16e47 100644 --- a/modules/plugins/lsp/config.nix +++ b/modules/plugins/lsp/config.nix @@ -4,7 +4,6 @@ pkgs, ... }: let - inherit (lib.generators) mkLuaInline; inherit (lib.modules) mkIf; inherit (lib.strings) optionalString; inherit (lib.trivial) boolToString; @@ -29,25 +28,6 @@ in { sourcePlugins = ["cmp-nvim-lsp"]; }; - autocmds = - if cfg.inlayHints.enable - then [ - { - callback = mkLuaInline '' - function(event) - local bufnr = event.buf - local client = vim.lsp.get_client_by_id(event.data.client_id) - if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then - vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr }) - end - end - ''; - desc = "LSP on-attach enable inlay hints autocmd"; - event = ["LspAttach"]; - } - ] - else []; - pluginRC.lsp-setup = '' vim.g.formatsave = ${boolToString cfg.formatOnSave}; diff --git a/modules/plugins/lsp/module.nix b/modules/plugins/lsp/module.nix index f408d873..b16f9c13 100644 --- a/modules/plugins/lsp/module.nix +++ b/modules/plugins/lsp/module.nix @@ -5,9 +5,6 @@ in { options.vim.lsp = { enable = mkEnableOption "LSP, also enabled automatically through null-ls and lspconfig options"; formatOnSave = mkEnableOption "format on save"; - inlayHints = { - enable = mkEnableOption "inlay hints"; - }; mappings = { goToDefinition = mkMappingOption "Go to definition"