feat(neovim): Rust dev with rustaceanvim & LSP servers installation through OS installer and NOT mason

- Use `rustaceanvim` for Rust development
- `rustaceanvim` keymaps in NeoVim `after` file
- Remove Rust LSP setup through builtin LSP
- Remove LSP installations from Mason when equivalent available through
  OS installers
- All LSP plugins in `code-lsp.lua`
This commit is contained in:
Pratik Tripathy
2025-07-28 10:44:32 +05:30
parent e6827f91ad
commit dd9246cda7
7 changed files with 104 additions and 33 deletions

View File

@@ -0,0 +1,23 @@
-- TODO: Map all native Nvim 0.11 LSP commands to corresponding rustaceanvim ones
-- grn -> Rename
-- grr -> References
-- gri -> Implementation
-- gO -> document_symbol
-- gra -> code_action
-- Mine
-- F2 -> Rename
-- gD -> Go to definition
-- <leader>cr -> References
-- <leader>co -> document_symbol
if pcall(require, "rustaceanvim") then
local bufnr = vim.api.nvim_get_current_buf()
vim.keymap.set("n", "<C-.>", function()
vim.cmd.RustLsp("codeAction")
end, { silent = true, buffer = bufnr })
vim.keymap.set("n", "K", function()
vim.cmd.RustLsp({ "hover", "actions" })
end, { silent = true, buffer = bufnr })
end