From f72f57ebf03360c5e6994f6cb615148c99a561ef Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Tue, 10 Jun 2025 12:00:49 +0300 Subject: [PATCH] chore(nvim): remove volar, prefix lsp commands with leader Signed-off-by: Ismo Vuorinen --- config/nvim/lua/plugins/lsp.lua | 35 ++++++++++++++------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/config/nvim/lua/plugins/lsp.lua b/config/nvim/lua/plugins/lsp.lua index f58ddda..5b47b19 100644 --- a/config/nvim/lua/plugins/lsp.lua +++ b/config/nvim/lua/plugins/lsp.lua @@ -38,41 +38,46 @@ return { -- Rename the variable under your cursor. -- Most Language Servers support renaming across files, etc. - map('grn', vim.lsp.buf.rename, '[R]e[n]ame') + map('grn', vim.lsp.buf.rename, '[R]e[n]ame') -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. - map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) + map( + 'gra', + vim.lsp.buf.code_action, + '[G]oto Code [A]ction', + { 'n', 'x' } + ) -- Find references for the word under your cursor. - map('grr', tsb.lsp_references, '[G]oto [R]eferences') + map('grr', tsb.lsp_references, '[G]oto [R]eferences') -- Jump to the implementation of the word under your cursor. -- Useful when your language has ways of declaring types without -- an actual implementation. - map('gri', tsb.lsp_implementations, '[G]oto [I]mplementation') + map('gri', tsb.lsp_implementations, '[G]oto [I]mplementation') -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is -- defined, etc. To jump back, press . - map('grd', tsb.lsp_definitions, '[G]oto [D]efinition') + map('grd', tsb.lsp_definitions, '[G]oto [D]efinition') -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. - map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') -- Fuzzy find all the symbols in your current document. -- Symbols are things like variables, functions, types, etc. - map('gO', tsb.lsp_document_symbols, 'Open Document Symbols') + map('gO', tsb.lsp_document_symbols, 'Open Document Symbols') -- Fuzzy find all the symbols in your current workspace. -- Similar to document symbols, except searches over your entire project. - map('gW', tsb.lsp_dynamic_workspace_symbols, 'Open Workspace Symbols') + map('gW', tsb.lsp_dynamic_workspace_symbols, 'Open Workspace Symbols') -- Jump to the type of the word under your cursor. -- Useful when you're not sure what type a variable is and you want to see -- the definition of its *type*, not where it was *defined*. - map('grt', tsb.lsp_type_definitions, '[G]oto [T]ype Definition') + map('grt', tsb.lsp_type_definitions, '[G]oto [T]ype Definition') -- This function resolves a difference between neovim nightly -- (version 0.11) and stable (version 0.10) @@ -227,17 +232,6 @@ return { tailwindcss = {}, terraformls = {}, ts_ls = {}, - volar = { - settings = { - typescript = { - inlayHints = { - enumMemberValues = { enabled = true }, - functionLikeReturnTypes = { enabled = true }, - propertyDeclarationTypes = { enabled = true }, - }, - }, - }, - }, vimls = {}, eslint = {}, yamlls = { @@ -270,6 +264,7 @@ return { require('mason-lspconfig').setup { ensure_installed = {}, -- explicitly set to an empty table + automatic_enable = true, automatic_installation = false, handlers = { function(server_name)