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
This commit is contained in:
2025-03-06 11:28:30 +01:00
parent d2d5262466
commit f30726c08b
4 changed files with 53 additions and 8 deletions

View File

@@ -11,17 +11,25 @@ require('mason').setup({
require('mason-lspconfig').setup({
-- A list of servers to automatically install if they're not already installed
ensure_installed = {
'pylsp',
'lua_ls',
-- 'rust_analyzer', -- handled by rust mrcjkb/rustaceanvim
'yamlls',
'ts_ls',
'gopls',
'pylsp',
'clangd',
},
})
-- lsp format selected range
function LSPRangeFormatFunction()
vim.lsp.buf.format({
async = true,
range = {
["start"] = vim.api.nvim_buf_get_mark(0, "<"),
["end"] = vim.api.nvim_buf_get_mark(0, ">"),
}
})
end
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
@@ -43,6 +51,7 @@ local on_attach = function(client, bufnr)
vim.keymap.set("n", "<space>f", function()
vim.lsp.buf.format({ async = true })
end, { desc = "LSP Format buffer", unpack(bufopts) })
vim.keymap.set("v", "<space>f", LSPRangeFormatFunction, { desc = "LSP Format region" })
-- 2024-09-09 - some ccflow commands for diagnostics, symbols and code actions
local fzf = require('fzf-lua')