diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-07-24 22:54:49 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-07-24 22:54:49 +0300 |
| commit | c1020414eaf2f3210daf3ca80bb63d5d7cc0d6d8 (patch) | |
| tree | e8a198c790fdf729cb34189dd0ba1ef5fbb84a63 /.config/nvim/lua/custom/config/rustaceanvim.lua | |
| parent | 499fabdab372ae13002528595184fb8370d322f4 (diff) | |
feat(neovim): started rust configuration and tweaked some lsp stuff
Diffstat (limited to '.config/nvim/lua/custom/config/rustaceanvim.lua')
| -rw-r--r-- | .config/nvim/lua/custom/config/rustaceanvim.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/.config/nvim/lua/custom/config/rustaceanvim.lua b/.config/nvim/lua/custom/config/rustaceanvim.lua new file mode 100644 index 0000000..b8c2c1b --- /dev/null +++ b/.config/nvim/lua/custom/config/rustaceanvim.lua @@ -0,0 +1,32 @@ +---@type RustaceanOpts +vim.g.rustaceanvim = { + ---@type RustaceanToolsOpts + tools = { + float_win_config = { + border = 'rounded', + }, + }, + ---@type RustaceanLspClientOpts + server = { + on_attach = function(_, bufnr) + local keymaps = { + { { 'n', 'i' }, '<M-Enter>', '<cmd>RustLsp codeAction<cr>', { desc = 'Code Action' } }, + } + + for _, keymap in ipairs(keymaps) do + local modes = keymap[1] + local lhs = keymap[2] + local rhs = keymap[3] + local opts = keymap[4] + opts.buffer = bufnr + + vim.keymap.set(modes, lhs, rhs, opts) + end + end, + default_settings = { + ['rust-analyzer'] = {}, + }, + }, + ---@type RustaceanDapOpts + dap = {}, +} |
