Files
neovim-configuration/after/ftplugin/rust.lua
Sascha Lüdecke f30726c08b Misc: rust, shortcuts, show indent, org-mode to HTML improvement
Keybindings:

- Rust F5 - show run targets
- Rust Shift-F5 - run last target
- Normal: Space-o - open current file in chromium
- Visual: Space-f - LSP format current region

Configuration:

- org-mode: use pandoc to generate a standalone HTML, support plantuml
  blocks
- no winbar for neo tree
- disabled treesitter asciidoc, seems to be broken
- splash screen: added browse, reordered entries

Plugins:

- use indent-blankline to visualize indents
2025-03-06 11:28:30 +01:00

32 lines
616 B
Lua

local bufnr = vim.api.nvim_get_current_buf()
vim.keymap.set(
"n",
"<space>E",
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' }
)