diff --git a/home/private_dot_config/nvim/lua/plugins/lsp-config.lua b/home/private_dot_config/nvim/lua/plugins/lsp-config.lua index 016598b..d92dae4 100644 --- a/home/private_dot_config/nvim/lua/plugins/lsp-config.lua +++ b/home/private_dot_config/nvim/lua/plugins/lsp-config.lua @@ -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" }, "c", "", { desc = "+code" }) vim.keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, { desc = "action" }) + vim.keymap.set({ "n", "v" }, "cr", vim.lsp.buf.rename, { desc = "rename" }) end, }, } diff --git a/home/private_dot_config/nvim/lua/plugins/treesitter.lua b/home/private_dot_config/nvim/lua/plugins/treesitter.lua index d4a8e05..f854eca 100644 --- a/home/private_dot_config/nvim/lua/plugins/treesitter.lua +++ b/home/private_dot_config/nvim/lua/plugins/treesitter.lua @@ -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 },