This repository has been archived on 2024-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
neovim/plugins/lsp/lspconfig.lua

32 lines
1.0 KiB
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)
vim.keymap.set('n', '<localleader>rn', vim.lsp.buf.rename, 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({})