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 KiB
Lua
Raw Permalink Normal View History

2022-09-16 23:42:53 +03:00
local lsp_config = require("lspconfig")
2022-09-19 20:43:20 +03:00
local saga = require("lspsaga")
-- See: https://github.com/glepnir/lspsaga.nvim#configuration
saga.init_lsp_saga({
code_action_lightbulb = { enable = false },
2022-10-02 22:19:10 +03:00
symbol_in_winbar = { enable = false },
2022-09-19 20:43:20 +03:00
})
2022-09-16 23:42:53 +03:00
-- 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 }
2022-09-19 20:43:20 +03:00
vim.keymap.set("n", "<localleader>n", "<Cmd>Lspsaga rename<CR>", bufopts)
vim.keymap.set('n', '<localleader>rn', vim.lsp.buf.rename, bufopts)
2022-09-16 23:42:53 +03:00
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,
})
2022-09-16 23:42:53 +03:00
-- nix
lsp_config.nil_ls.setup({})