chore(neovim): rework lua lsp configuration
This commit is contained in:
parent
508e84bde6
commit
f1b295db43
1 changed files with 16 additions and 1 deletions
|
@ -77,6 +77,21 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||
lspconfig.lua_ls.setup {
|
||||
capabilities = capabilities,
|
||||
single_file_support = true,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = {'vim'} -- Add any globals you want to ignore as undefined
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand('$VIMRUNTIME/lua')] = true
|
||||
}
|
||||
},
|
||||
telemetry = {
|
||||
enable = false -- Disable telemetry
|
||||
}
|
||||
}
|
||||
},
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
}
|
||||
|
@ -192,7 +207,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
-- Jumps to the definition of the type symbol
|
||||
bufmap('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>')
|
||||
|
||||
-- Lists all the references
|
||||
-- Lists all the references
|
||||
bufmap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>')
|
||||
|
||||
-- Displays a function's signature information
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue