chore(nvim): remove volar, prefix lsp commands with leader

Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
This commit is contained in:
2025-06-10 12:00:49 +03:00
parent b5e56e2cbb
commit f72f57ebf0

View File

@@ -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('<leader>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(
'<leader>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('<leader>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('<leader>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 <C-t>.
map('grd', tsb.lsp_definitions, '[G]oto [D]efinition')
map('<leader>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('<leader>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('<leader>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('<leader>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('<leader>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)