idk what all...
This commit is contained in:
@@ -15,6 +15,8 @@ return {
|
||||
{ 'j-hui/fidget.nvim', opts = {} },
|
||||
},
|
||||
config = function()
|
||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
||||
callback = function(event)
|
||||
@@ -26,6 +28,7 @@ return {
|
||||
map('grn', vim.lsp.buf.rename, '[R]e[n]ame')
|
||||
map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
|
||||
map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
||||
map('K', vim.lsp.buf.hover, 'Hover Documentation')
|
||||
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if client and client:supports_method('textDocument/documentHighlight', event.buf) then
|
||||
@@ -61,6 +64,7 @@ return {
|
||||
local servers = {
|
||||
clangd = {},
|
||||
gopls = {},
|
||||
jdtls = {},
|
||||
-- pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
-- ts_ls = {},
|
||||
@@ -107,6 +111,7 @@ return {
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
for name, server in pairs(servers) do
|
||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||
vim.lsp.config(name, server)
|
||||
vim.lsp.enable(name)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user