| 12345678910111213141516171819202122232425262728 |
- return {
- {
- "neovim/nvim-lspconfig",
- enabled = true,
- lazy = false,
- config = function(_, _)
- -- Configuration on attach
- vim.api.nvim_create_autocmd("LspAttach", {
- group = vim.api.nvim_create_augroup("UserLspConfig", {}),
- callback = function(args)
- if vim.treesitter ~= nil and type(vim.treesitter.highlighter.active[args.buf]) ~= "nil" then
- local client = vim.lsp.get_client_by_id(args.data
- .client_id)
- client.server_capabilities.semanticTokensProvider = nil
- end
- vim.keymap.set("n", "SR", vim.lsp.buf.rename)
- vim.keymap.set("n", "Sx", vim.lsp.buf.code_action)
- vim.keymap.set("n", "SI", function()
- vim.lsp.inlay_hint.enable(
- not vim.lsp.inlay_hint.is_enabled())
- end)
- vim.keymap.set("n", "<Space>", vim.lsp.buf.hover)
- end
- })
- end
- }
- }
|