misc nvim lsp tweaks
This commit is contained in:
parent
68213db5e0
commit
14f6531071
2 changed files with 18 additions and 2 deletions
|
@ -9,7 +9,7 @@ return {
|
|||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = { "lua_ls" },
|
||||
ensure_installed = { "lua_ls", "marksman", "rust_analyzer", "pyright" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
@ -24,10 +24,26 @@ return {
|
|||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- markdown
|
||||
lspconfig.marksman.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- rust
|
||||
lspconfig.rust_analyzer.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- python
|
||||
lspconfig.pyright.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||
vim.keymap.set({ "n", "v" }, "<leader>c", "", { desc = "+code" })
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, { desc = "action" })
|
||||
vim.keymap.set({ "n", "v" }, "<leader>cr", vim.lsp.buf.rename, { desc = "rename" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ return {
|
|||
local configs = require("nvim-treesitter.configs")
|
||||
|
||||
configs.setup({
|
||||
ensure_installed = { "lua", "vim", "query", "javascript", "html", "python", "rust" },
|
||||
ensure_installed = { "lua", "vim", "query", "javascript", "html", "python", "rust", "markdown" },
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
highlight = { enable = true },
|
||||
|
|
Loading…
Add table
Reference in a new issue