Compare commits

...

10 commits

Author SHA1 Message Date
bbab0f1674
nvim: Add file bracketed movement
For now there is no strict reason to have it disabled, even if I don't
use it much. At the same time I can always re-disable it if I need the
bracketed movement for something more important later down the line.
2025-06-21 13:58:33 +02:00
f558a68976
nvim: Change diagnostic movement to ][e
In preparation for adding debugging we change the bracket movement
between diagnostics from `[d`/`]d` to `[e`/`]e` instead.

This will be a big switch in muscle memory for me and I hope I can adapt
to it pretty quickly, but at least mnemonically it still makes sense
since we jump between [E]rrors (or warnings but good enough).
2025-06-21 13:58:33 +02:00
8f9954bd8a
nvim: Fix bracketed configuration
mini.bracketed never received its configuration which is the reason I
had some issues in the past. It was simply wrapped in one too many
layers of tables. Now works as intended.
2025-06-21 13:58:32 +02:00
22e8f9761f
nvim: Version-pin treesitter again
Treesitter had to run as a non-versioned (trunk-tracking) plugin for a
while since there was no updated version released.
Now that it is we can return to a nicely versioned tag.
2025-06-21 13:58:32 +02:00
bb11a12f25
nvim: Remove criticmarkup
Sad but I'll have to face it - I've never successfully used
criticmarkup in, by now, 6 years of professional academic writing.

The plugin also does not work as well as it should (anymore?) with my
current neovim setup. The `:Critic` command works neither with accept
nor reject and the different highlights are presumably overwritten by
treesitter queries.

Now, all of those _could_ be fixed but as I say above, I have never
successfully used the markup. Perhaps one day it could be implemented in
a slick nvim lua plugin with hiding and extmarks which mimicks a truly
nice review editing experience. But not today.
2025-06-21 13:58:31 +02:00
b9c60ffde6
nvim: Update plugins 2025-06-21 13:58:31 +02:00
9f415f8ccc
nvim: Fix render-markdown naming scheme
Old versions of render-markdown.nvim suggested renaming it to another
plugin name, but this seems to not be the case anymore. I removed both
for the time being and it fixed a long-standing issue I had with the
plugin.
2025-06-21 13:58:30 +02:00
35d1f8b03d
nvim: Improve mini.pairs triple mappings
Whenever there is a left-over quote (') or double quote ("), if we want
to 'close' it, mini.pairs will by default add a new pair (e.g. """)
instead. This simply changes it to close the pair. Makes some
'double-quote' pairings harder (e.g. we have a python dict: {"name"})
and want to add another {"name""value"} into it, but this happens
relatively rarely in my use cases. The first on the other hand happens
frequently enough to be an annoyance.

Additionally, did the same for back-ticks so we can more easily create
triple backticks ``` which are essential in many literate programming
markup languages (markdown, quarto, rmd and so on).
2025-06-21 13:58:30 +02:00
b5198c385c
nvim: Switch zenmode to new toggle map
Like other 'switch' toggles, turn on/off zen-mode with `]sz`/`[sz`
respectively.
2025-06-21 13:58:29 +02:00
a3b1efeb05
nvim: Set default tabwidth in md, quarto to 2
Makes it easier to read lists, and also easier to work with
markdownlint even if it has not been configured for a given repository
(since its list indentations default to 2 spaces).
2025-06-21 13:58:26 +02:00
7 changed files with 78 additions and 34 deletions

View file

@ -1,5 +1,9 @@
local map = vim.keymap.set
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
if require("core.util").is_available("which-key") then
require("which-key").add({
{ "<localleader>c", group = "codecells" },

View file

@ -1,5 +1,11 @@
local map = vim.keymap.set
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2
if require("core.util").is_available("quarto") then
vim.keymap.set("n", "<localleader>po", require("quarto").quartoPreview, { desc = "show quarto preview" })
map("n", "<localleader>po", require("quarto").quartoPreview, { desc = "show quarto preview" })
end
-- TODO: Puths kernel into local file dir currently,
@ -65,7 +71,7 @@ end
vim.api.nvim_create_user_command("JupyterStart", function(opts)
startsession(opts)
end, { nargs = "?" })
vim.keymap.set("n", "<localleader>cS", ":JupyterStart<cr>", { desc = "start code session", silent = true })
map("n", "<localleader>cS", ":JupyterStart<cr>", { desc = "start code session", silent = true })
if vim.g.quarto_auto_init_molten_session then
vim.api.nvim_create_autocmd({ "BufEnter" }, {

View file

@ -20,7 +20,7 @@
"flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fwatch.nvim": { "branch": "main", "commit": "a691f7349dc66285cd75a1a698dd28bca45f2bf8" },
"fzf-lua": { "branch": "main", "commit": "c53ba4f40f0514a5038646fb1e9ce05872b18eb1" },
"fzf-lua": { "branch": "main", "commit": "05eaee319fcf2f5a0d378c2848641858c8b8962e" },
"git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" },
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
"glance.nvim": { "branch": "master", "commit": "bf86d8b79dce808e65fdb6e9269d0b4ed6d2eefc" },
@ -56,7 +56,7 @@
"nvim-FeMaco.lua": { "branch": "main", "commit": "96bbf843595dbe865838b3f2484b73557f34700c" },
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
"nvim-coverage": { "branch": "main", "commit": "a939e425e363319d952a6c35fb3f38b34041ded2" },
"nvim-lint": { "branch": "master", "commit": "2b0039b8be9583704591a13129c600891ac2c596" },
"nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" },
"nvim-lspconfig": { "branch": "master", "commit": "77d3fdfb3554632c7a3b101ded643d422de7626f" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
@ -74,7 +74,7 @@
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"quarto-nvim": { "branch": "main", "commit": "5325af3731ac9840b308791f08ad660958d76163" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "1ab18259472d9fe5756750fec722c31bab1712da" },
"render-markdown": { "branch": "main", "commit": "6d03af10063d5a2fadec3559de5dfa68da7d00ef" },
"render-markdown.nvim": { "branch": "main", "commit": "6d03af10063d5a2fadec3559de5dfa68da7d00ef" },
"smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" },
"stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" },
"texpresso.vim": { "branch": "main", "commit": "907838c08bbf99ad6bed3c908f1d0551a92ab4e0" },
@ -85,7 +85,6 @@
"typst-preview.nvim": { "branch": "master", "commit": "dea4525d5420b7c32eebda7de15a6beb9d6574fa" },
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
"vifm.vim": { "branch": "master", "commit": "617e3dc7c9af1f03cc664124aff2fe98fafcf1b2" },
"vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" },
"vim-numbertoggle": { "branch": "main", "commit": "df9b1fe616507340718716204ba7f434125bdf7a" },
"vim-spellsync": { "branch": "master", "commit": "ea9f431483ceb40ede8bd5b126a03eccd49b1bc0" },
"wezterm.nvim": { "branch": "main", "commit": "f73bba23ab4becd146fa2d0a3a16a84b987eeaca" },

View file

@ -183,22 +183,20 @@ return {
require("mini.align").setup({})
require("mini.bracketed").setup({
{
buffer = { suffix = "b", options = {} },
comment = { suffix = "k", options = {} },
conflict = { suffix = "" }, -- disable to use git-conflict instead
diagnostic = { suffix = "d", options = {} },
file = { suffix = "", options = {} },
indent = { suffix = "" }, -- disable since we use indentscope
jump = { suffix = "j", options = {} },
location = { suffix = "l", options = {} },
oldfile = { suffix = "o", options = {} }, -- FIXME: overwritten by wrapping defaults currently
quickfix = { suffix = "q", options = {} },
treesitter = { suffix = "t", options = {} },
undo = { suffix = "" }, -- disable since I don't need it
window = { suffix = "w", options = {} },
yank = { suffix = "y", options = {} },
},
buffer = { suffix = "b", options = {} },
comment = { suffix = "k", options = {} },
conflict = { suffix = "" }, -- disable to use git-conflict instead
diagnostic = { suffix = "e", options = {} },
file = { suffix = "f", options = {} },
indent = { suffix = "" }, -- disable since we use indentscope
jump = { suffix = "j", options = {} },
location = { suffix = "l", options = {} },
oldfile = { suffix = "o", options = {} }, -- FIXME: overwritten by wrapping defaults currently
quickfix = { suffix = "q", options = {} },
treesitter = { suffix = "t", options = {} },
undo = { suffix = "" }, -- disable since I don't need it
window = { suffix = "w", options = {} },
yank = { suffix = "y", options = {} },
})
require("mini.comment").setup({
hooks = {
@ -250,7 +248,33 @@ return {
require("mini.map").setup()
require("mini.move").setup()
require("mini.operators").setup()
require("mini.pairs").setup()
require("mini.pairs").setup({
mappings = {
-- these mappings ensure that when trying to _close_ any of the pairs
-- it will not double insert:
-- " <- you are here. Normal pairs will do """. This config will do "".
['"'] = {
action = "closeopen",
pair = '""',
neigh_pattern = '[^\\"].',
register = { cr = false },
},
["'"] = {
action = "closeopen",
pair = "''",
neigh_pattern = "[^%a\\'].",
register = { cr = false },
},
["`"] = {
action = "closeopen",
pair = "``",
neigh_pattern = "[^\\`].",
register = { cr = false },
},
["<"] = { action = "open", pair = "<>", neigh_pattern = "\r." },
[">"] = { action = "close", pair = "<>" },
},
})
require("mini.trailspace").setup()
end,
})

View file

@ -134,17 +134,17 @@ vim.api.nvim_create_autocmd("LspAttach", {
local map = vim.keymap.set
map("n", "K", "<cmd>lua vim.lsp.buf.hover()<cr>", o({ desc = "Hover definition" }))
map("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<cr>", o({ desc = "Previous diagnostic" }))
map("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<cr>", o({ desc = "Next diagnostic" }))
map("n", "[e", "<cmd>lua vim.diagnostic.goto_prev()<cr>", o({ desc = "Previous diagnostic" }))
map("n", "]e", "<cmd>lua vim.diagnostic.goto_next()<cr>", o({ desc = "Next diagnostic" }))
map(
"n",
"[D",
"[E",
"<cmd>lua vim.diagnostic.goto_prev({severity = vim.diagnostic.severity.ERROR})<cr>",
o({ desc = "Previous error" })
)
map(
"n",
"]D",
"]E",
"<cmd>lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})<cr>",
o({ desc = "Next error" })
)

View file

@ -34,7 +34,24 @@ local prose_plugs = {
config = true,
cmd = { "ZenMode" },
dependencies = { "folke/twilight.nvim" },
keys = { { "<leader>sz", ":ZenMode<cr>", silent = true, desc = "toggle zen mode" } },
keys = {
{
"[sz",
function()
require("zen-mode").close()
end,
silent = true,
desc = "stop zen mode",
},
{
"]sz",
function()
require("zen-mode").open()
end,
silent = true,
desc = "start zen mode",
},
},
},
{
"andrewferrier/wrapping.nvim",
@ -68,7 +85,6 @@ local prose_plugs = {
-- displays prettier md rendering
{
"MeanderingProgrammer/render-markdown.nvim",
main = "render-markdown",
opts = {
file_types = { "markdown", "codecompanion" },
render_modes = { "n", "c", "i" },
@ -91,7 +107,6 @@ local prose_plugs = {
},
},
},
name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons",
@ -270,9 +285,6 @@ local prose_plugs = {
},
},
-- syntax highlighting for markdown criticmarkup (comments, additions, ...)
{ "vim-pandoc/vim-criticmarkup", ft = md_like },
-- create mindmaps from your markdown
{
"Zeioth/markmap.nvim",

View file

@ -21,7 +21,6 @@ return {
},
{ "nushell/tree-sitter-nu", version = false },
},
version = false, -- TODO: Can be set to versioned if new version after 2024-12-12 is released
config = function()
local enabled_parsers = {}
for _, lang in pairs(Languages) do