mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-14 18:53:16 +00:00
chore(nvim): remove volar, prefix lsp commands with leader
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
This commit is contained in:
@@ -38,41 +38,46 @@ return {
|
|||||||
|
|
||||||
-- Rename the variable under your cursor.
|
-- Rename the variable under your cursor.
|
||||||
-- Most Language Servers support renaming across files, etc.
|
-- 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
|
-- 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.
|
-- 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.
|
-- 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.
|
-- Jump to the implementation of the word under your cursor.
|
||||||
-- Useful when your language has ways of declaring types without
|
-- Useful when your language has ways of declaring types without
|
||||||
-- an actual implementation.
|
-- 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.
|
-- Jump to the definition of the word under your cursor.
|
||||||
-- This is where a variable was first declared, or where a function is
|
-- This is where a variable was first declared, or where a function is
|
||||||
-- defined, etc. To jump back, press <C-t>.
|
-- 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.
|
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
||||||
-- For example, in C this would take you to the header.
|
-- 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.
|
-- Fuzzy find all the symbols in your current document.
|
||||||
-- Symbols are things like variables, functions, types, etc.
|
-- 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.
|
-- Fuzzy find all the symbols in your current workspace.
|
||||||
-- Similar to document symbols, except searches over your entire project.
|
-- 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.
|
-- 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
|
-- 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*.
|
-- 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
|
-- This function resolves a difference between neovim nightly
|
||||||
-- (version 0.11) and stable (version 0.10)
|
-- (version 0.11) and stable (version 0.10)
|
||||||
@@ -227,17 +232,6 @@ return {
|
|||||||
tailwindcss = {},
|
tailwindcss = {},
|
||||||
terraformls = {},
|
terraformls = {},
|
||||||
ts_ls = {},
|
ts_ls = {},
|
||||||
volar = {
|
|
||||||
settings = {
|
|
||||||
typescript = {
|
|
||||||
inlayHints = {
|
|
||||||
enumMemberValues = { enabled = true },
|
|
||||||
functionLikeReturnTypes = { enabled = true },
|
|
||||||
propertyDeclarationTypes = { enabled = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
vimls = {},
|
vimls = {},
|
||||||
eslint = {},
|
eslint = {},
|
||||||
yamlls = {
|
yamlls = {
|
||||||
@@ -270,6 +264,7 @@ return {
|
|||||||
|
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
ensure_installed = {}, -- explicitly set to an empty table
|
ensure_installed = {}, -- explicitly set to an empty table
|
||||||
|
automatic_enable = true,
|
||||||
automatic_installation = false,
|
automatic_installation = false,
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user