diff options
Diffstat (limited to '')
| -rw-r--r-- | plugin/30-lspconfig.lua (renamed from lua/pml68/lsp.lua) | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/lua/pml68/lsp.lua b/plugin/30-lspconfig.lua index 6736e26..d8a9cfc 100644 --- a/lua/pml68/lsp.lua +++ b/plugin/30-lspconfig.lua @@ -14,7 +14,6 @@ local servers = { "lua_ls", "glsl_analyzer", "csharp_ls", - "gopls", "unocss", } @@ -29,8 +28,29 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, { end, }) +vim.api.nvim_create_autocmd({ "BufEnter" }, { + once = true, + pattern = { "Cargo.toml" }, + callback = function() + vim.pack.add({ "https://github.com/saecki/crates.nvim" }) + require("crates").setup({ + lsp = { + enabled = true, + actions = true, + completion = true, + hover = true, + }, + }) + + vim.keymap.set("n", "<leader>rcu", function() + require("crates").upgrade_all_crates() + end) + end, +}) + vim.lsp.config('*', { on_attach = function(client, bufnr) + vim.pack.add({ "https://github.com/artemave/workspace-diagnostics.nvim" }) require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr) end }) |
