diff options
| author | gyoder <70408179+gyoder@users.noreply.github.com> | 2025-06-14 11:41:23 +0200 |
|---|---|---|
| committer | gyoder <70408179+gyoder@users.noreply.github.com> | 2025-06-14 11:41:23 +0200 |
| commit | bdf3cdecda3d112b14e3ceb50ce4f88862813270 (patch) | |
| tree | aec5cd7764ff726740426dd9e4897e8cdcbf97b6 /vim/.config/nvim/lua/plugins/rust-config.lua | |
| parent | d6d6dab3806f88e27990936e83c7b74d08215a9d (diff) | |
added existing nvim config
Diffstat (limited to 'vim/.config/nvim/lua/plugins/rust-config.lua')
| -rw-r--r-- | vim/.config/nvim/lua/plugins/rust-config.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/vim/.config/nvim/lua/plugins/rust-config.lua b/vim/.config/nvim/lua/plugins/rust-config.lua new file mode 100644 index 0000000..e83007c --- /dev/null +++ b/vim/.config/nvim/lua/plugins/rust-config.lua @@ -0,0 +1,30 @@ +local bufnr = vim.api.nvim_get_current_buf() +vim.keymap.set( + "n", + "<leader>a", + function() + vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping + -- or vim.lsp.buf.codeAction() if you don't want grouping. + end, + { silent = true, buffer = bufnr } +) +vim.keymap.set( + "n", + "K", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions + function() + vim.cmd.RustLsp({'hover', 'actions'}) + end, + { silent = true, buffer = bufnr } +) + +vim.g.rustaceanvim = { + server = { + settings = { + ["rust-analyzer"] = { + checkOnSave = { + command = "clippy", + }, + }, + }, + }, +} |
