chore(neovim): rework lua lsp configuration

This commit is contained in:
Yorick Barbanneau 2025-01-03 00:15:36 +01:00
parent 508e84bde6
commit f1b295db43

View file

@ -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