{ pkgs, icons, ... }: { plugins = { lsp-format = { enable = false; # Enable it if you want lsp-format integration for none-ls }; lsp = { enable = true; capabilities = "offsetEncoding = 'utf-16'"; servers = { clangd = {enable = true;}; lua_ls = { enable = true; extraOptions = { settings = { Lua = { completion = { callSnippet = "Replace"; }; telemetry = { enabled = false; }; hint = {enable = true;}; }; }; }; }; nil_ls = {enable = true;}; ts_ls = { enable = true; extraOptions = { settings = { javascript = { inlayHints = { includeInlayEnumMemberValueHints = true; includeInlayFunctionLikeReturnTypeHints = true; includeInlayFunctionParameterTypeHints = true; includeInlayParameterNameHints = "all"; includeInlayParameterNameHintsWhenArgumentMatchesName = true; includeInlayPropertyDeclarationTypeHints = true; includeInlayVariableTypeHints = true; }; }; typescript = { inlayHints = { includeInlayEnumMemberValueHints = true; includeInlayFunctionLikeReturnTypeHints = true; includeInlayFunctionParameterTypeHints = true; includeInlayParameterNameHints = "all"; includeInlayParameterNameHintsWhenArgumentMatchesName = true; includeInlayPropertyDeclarationTypeHints = true; includeInlayVariableTypeHints = true; }; }; }; }; }; astro = {enable = true;}; volar = { enable = true; package = pkgs.vue-language-server; tslsIntegration = true; rootDir = ''require("lspconfig.util").root_pattern("src/App.vue")''; }; svelte = {enable = true;}; eslint = {enable = true;}; pyright = {enable = true;}; ruff_lsp = {enable = true;}; rust_analyzer = { enable = true; installCargo = false; installRustc = false; settings = { checkOnSave = true; check = { command = "clippy"; }; # inlayHints = { # enable = true; # showParameterNames = true; # parameterHintsPrefix = "<- "; # otherHintsPrefix = "=> "; # }; procMacro = { enable = true; }; }; }; dartls.enable = true; }; # keymaps = { # silent = true; # lspBuf = { # gd = { # action = "definition"; # desc = "Goto Definition"; # }; # gr = { # action = "references"; # desc = "Goto References"; # }; # gD = { # action = "declaration"; # desc = "Goto Declaration"; # }; # gI = { # action = "implementation"; # desc = "Goto Implementation"; # }; # gT = { # action = "type_definition"; # desc = "Type Definition"; # }; # K = { # action = "hover"; # desc = "Hover"; # }; # "cw" = { # action = "workspace_symbol"; # desc = "Workspace Symbol"; # }; # "cr" = { # action = "rename"; # desc = "Rename"; # }; # "ca" = { # action = "code_action"; # desc = "Code Action"; # }; # "" = { # action = "signature_help"; # desc = "Signature Help"; # }; # }; # diagnostic = { # "cd" = { # action = "open_float"; # desc = "Line Diagnostics"; # }; # "[d" = { # action = "goto_next"; # desc = "Next Diagnostic"; # }; # "]d" = { # action = "goto_prev"; # desc = "Previous Diagnostic"; # }; # }; # }; }; }; extraConfigLua = '' local _border = "rounded" vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( vim.lsp.handlers.hover, { border = _border } ) vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( vim.lsp.handlers.signature_help, { border = _border } ) vim.diagnostic.config({ float={border=_border}, signs = { text = { [vim.diagnostic.severity.ERROR] = "${icons.diagnostics.Error}", [vim.diagnostic.severity.WARN] = "${icons.diagnostics.Warn}", [vim.diagnostic.severity.HINT] = "${icons.diagnostics.Hint}", [vim.diagnostic.severity.INFO] = "${icons.diagnostics.Info}", }, }, }) require('lspconfig.ui.windows').default_options = { border = _border } ''; }