add rustaceanvim
This commit is contained in:
parent
a788910840
commit
639e8e2553
18
ftplugin/rust.lua
Normal file
18
ftplugin/rust.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
|
||||
local function map(mode, lhs, rhs, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
opts.silent = true
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
end
|
||||
|
||||
map('n', '<leader>ra', '<Cmd>RustLsp codeAction<CR>', { desc = 'Code [A]ction' })
|
||||
map('n', '<leader>rr', '<Cmd>RustLsp run<CR>', { desc = '[R]un' })
|
||||
map('n', '<leader>rR', '<Cmd>RustLsp runnables<CR>', { desc = '[R]unnables' })
|
||||
map('n', '<leader>rd', '<Cmd>RustLsp debug<CR>', { desc = '[D]ebug' })
|
||||
map('n', '<leader>rD', '<Cmd>RustLsp debuggables<CR>', { desc = '[D]ebuggables' })
|
||||
map('n', '<leader>rt', '<Cmd>RustLsp testables<CR>', { desc = '[T]estables' })
|
||||
map('n', '<leader>re', '<Cmd>RustLsp explainError<CR>', { desc = '[E]xplain Error' })
|
||||
map('n', '<leader>ri', '<Cmd>RustLsp renderDiagnostic<CR>', { desc = 'Show Next D[i]agnostic' })
|
||||
map('n', '<leader>ro', '<Cmd>RustLsp openCargo<CR>', { desc = '[O]pen Cargo.toml' })
|
|
@ -31,6 +31,7 @@
|
|||
"nvim-treesitter": { "branch": "master", "commit": "749df308870381979dc098063973f6ace9968ef6" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "d3a8b145f0b3db4de9a08fcbc604659f52ee4fbc" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
|
|
7
lua/plugins/rustaceanvim.lua
Normal file
7
lua/plugins/rustaceanvim.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
{
|
||||
'mrcjkb/rustaceanvim',
|
||||
version = '^5',
|
||||
lazy = false,
|
||||
},
|
||||
}
|
|
@ -48,6 +48,7 @@ return {
|
|||
{ '<leader>t', group = '[T]oggle' },
|
||||
{ '<leader>l', group = '[L]SP' },
|
||||
{ '<leader>b', group = '[B]uffer' },
|
||||
{ '<leader>r', group = '[R]ust' },
|
||||
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue