dotfiles/.config/nvim/after/plugin/lsp.lua
2023-04-06 02:22:23 +01:00

19 lines
498 B
Lua

local lsp = require('lsp-zero').preset({})
vim.diagnostic.config({
virtual_text = true
})
lsp.on_attach(function(client, bufnr)
lsp.default_keymaps({buffer = bufnr})
-- Set tagfunc back to empty instead of vim.lsp.tagfunc(),
-- to use default tag jumping behaviour withouth going through the lsp.
-- - see https://neovim.io/doc/user/lsp.html
vim.opt.tagfunc = ""
end)
-- (Optional) Configure lua language server for neovim
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
lsp.setup()