Keybindings: - <space>E (explain error) now is <space>x - dropped <C-W>0 and following, were remainders from Emacs - insert: <C-Del> now deletes word right of cursor LSP: - diagnostics popup replaced with neovim 0.11 virtual lines (much nicer) Options: - neo-tree width dropped, was too wide - workspaces no longer auto open, was interfering with using neovim as git client or file manager Plugins: - replaced cmp-rpncalc with qalc.nvim (which uses the qalc cli)
32 lines
616 B
Lua
32 lines
616 B
Lua
local bufnr = vim.api.nvim_get_current_buf()
|
|
|
|
vim.keymap.set(
|
|
"n",
|
|
"<space>x",
|
|
function()
|
|
vim.cmd.RustLsp({ 'explainError', 'current' })
|
|
end,
|
|
{ silent = true, buffer = bufnr, desc = 'RustLSP: explain error at cursor' }
|
|
)
|
|
|
|
|
|
-- show run targets
|
|
vim.keymap.set(
|
|
"n",
|
|
"<f5>",
|
|
function()
|
|
vim.cmd.RustLsp({ 'runnables' })
|
|
end,
|
|
{ silent = true, buffer = bufnr, desc = 'RustLSP: show runnables' }
|
|
)
|
|
|
|
-- run last target
|
|
vim.keymap.set(
|
|
"n",
|
|
"<S-f5>",
|
|
function()
|
|
vim.cmd.RustLsp({ 'runnables', bang = true })
|
|
end,
|
|
{ silent = true, buffer = bufnr, desc = 'RustLSP: show runnables' }
|
|
)
|