30 lines
1,004 B
Lua
30 lines
1,004 B
Lua
local lsp_config = require("lspconfig")
|
|
local saga = require("lspsaga")
|
|
|
|
-- See: https://github.com/glepnir/lspsaga.nvim#configuration
|
|
saga.init_lsp_saga({
|
|
code_action_lightbulb = { enable = false },
|
|
symbol_in_winbar = { enable = false },
|
|
})
|
|
|
|
-- always show signcolumns
|
|
vim.opt.signcolumn = "yes"
|
|
|
|
-- Use an on_attach function to only map the following keys
|
|
-- after the language server attaches to the current buffer
|
|
local on_attach = function(client, bufnr)
|
|
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
|
vim.keymap.set("n", "<localleader>n", "<Cmd>Lspsaga rename<CR>", bufopts)
|
|
end
|
|
|
|
-------------------------------------------------------------------------------
|
|
-- See: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
|
--
|
|
|
|
-- Override the default configuration to be applied to all servers
|
|
lsp_config.util.default_config = vim.tbl_extend("force", lsp_config.util.default_config, {
|
|
on_attach = on_attach,
|
|
})
|
|
|
|
-- nix
|
|
lsp_config.nil_ls.setup({})
|