2024-03-21 17:29:10 -05:00
|
|
|
local lspconfig = require('lspconfig')
|
|
|
|
-- lspconfig.pyright.setup {}
|
|
|
|
-- lspconfig.tsserver.setup {}
|
|
|
|
-- lspconfig.rust_analyzer.setup {
|
|
|
|
-- -- Server-specific settings. See `:help lspconfig-setup`
|
|
|
|
-- settings = {
|
|
|
|
-- ['rust-analyzer'] = {
|
|
|
|
-- check = {
|
|
|
|
-- command = "clippy",
|
|
|
|
-- }
|
|
|
|
-- },
|
|
|
|
-- },
|
|
|
|
-- }
|
2024-04-03 12:53:42 -05:00
|
|
|
|
|
|
|
-- Set ;k to hover and ;a to show code actions
|
|
|
|
vim.api.nvim_create_autocmd("LspAttach", {
|
2024-04-03 15:25:09 -05:00
|
|
|
callback = function()
|
2024-04-03 12:53:42 -05:00
|
|
|
map('n', '<localleader>k', vim.lsp.buf.hover, { remap = false })
|
|
|
|
map('n', '<localleader>a', vim.lsp.buf.code_action, { remap = false })
|
|
|
|
end,
|
|
|
|
})
|