my-nvim-config/vps/plugin/lsp_config.lua

22 lines
617 B
Lua
Raw Permalink Normal View History

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",
-- }
-- },
-- },
-- }
-- 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()
map('n', '<localleader>k', vim.lsp.buf.hover, { remap = false })
map('n', '<localleader>a', vim.lsp.buf.code_action, { remap = false })
end,
})