From ac01db2d6dcc5a4b7b87c9a4d1aac5ecdb440090 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 7 Oct 2025 17:13:03 +0200 Subject: [PATCH 1/4] aerc: Add scroll and unmark key binds --- office/.config/aerc/binds.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/office/.config/aerc/binds.conf b/office/.config/aerc/binds.conf index 5245faa..9db98df 100644 --- a/office/.config/aerc/binds.conf +++ b/office/.config/aerc/binds.conf @@ -50,6 +50,7 @@ gr = :cf Trash v = :mark -t V = :mark -V +v = :unmark -a J = :mark -t:next K = :mark -t:prev T = :prompt "Mark filter: " :mark @@ -118,6 +119,8 @@ N = :prev-result s = :split S = :vsplit + = :send-keys JJJ + = :send-keys KKK # send mails to taskwarrior ,t = :pipe -s -m mail-totask -c -d -t From eb6e72c58d586d1c00f9cd7bf5b92e191b471c72 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 10 Oct 2025 21:56:54 +0200 Subject: [PATCH 2/4] nvim: Add htmx lsp and mdslw markdown formatting mdslw will format markdown sentence-wise, in addition to 80-col width. Let's see if it's gonna be useful or super annoying. --- nvim/.config/nvim/lua/core/languages.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/core/languages.lua b/nvim/.config/nvim/lua/core/languages.lua index 22bc23e..9cac9f2 100644 --- a/nvim/.config/nvim/lua/core/languages.lua +++ b/nvim/.config/nvim/lua/core/languages.lua @@ -72,7 +72,7 @@ local languages = { dap = { "delve" }, }, graphql = { format = { graphql = { "prettier" } } }, - html = { format = { html = { "prettier", "rustywind" } } }, + html = { lsp = { htmx = {} }, format = { html = { "prettier", "rustywind" } } }, julia = { lsp = { julials = {} }, ts = { "julia" } }, json = { lsp = { jsonls = {} }, @@ -103,7 +103,7 @@ local languages = { lsp = { marksman = {} }, ts = { "markdown", "markdown_inline" }, lint = { markdown = { "markdownlint" } }, - format = { markdown = { "prettier", "injected" } }, + format = { markdown = { "prettier", "mdslw", "injected" } }, }, nim = { lsp = { nim_langserver = {} }, ts = { "nim", "nim_format_string" }, format = { nim = { "nimpretty" } } }, nu = nushell(), From 36bd07a7e5eda5e401c5f4e3b85fa73bc87bc7e3 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 10 Oct 2025 21:56:54 +0200 Subject: [PATCH 3/4] nvim: Enable markdown rendering for vimwiki and djot The reason render-markdown was not working for either is that it requires the markdown treesitter active for the respective language. With this, for the filetypes in question we simply tell the markdown treesitter to also parse these. This _might_ be a problem in the future if the djot treesitter (which also exists and can be enabled by TS in nvim) diverges more or some other unforeseen change happens. For now, it seems to work fine. Might not support all the features in djot that diverge from md? I have not used them extensively enough to notice. --- nvim/.config/nvim/after/ftplugin/djot.lua | 3 +++ nvim/.config/nvim/after/ftplugin/vimwiki.lua | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 nvim/.config/nvim/after/ftplugin/vimwiki.lua diff --git a/nvim/.config/nvim/after/ftplugin/djot.lua b/nvim/.config/nvim/after/ftplugin/djot.lua index 8bdca83..d0bf301 100644 --- a/nvim/.config/nvim/after/ftplugin/djot.lua +++ b/nvim/.config/nvim/after/ftplugin/djot.lua @@ -1,2 +1,5 @@ -- just copy markdown settings vim.cmd.runtime({"after/ftplugin/markdown.lua", bang=true}) + +-- until there's a specific djot TS, use markdown +vim.treesitter.language.register("markdown", "djot") diff --git a/nvim/.config/nvim/after/ftplugin/vimwiki.lua b/nvim/.config/nvim/after/ftplugin/vimwiki.lua new file mode 100644 index 0000000..4ec075d --- /dev/null +++ b/nvim/.config/nvim/after/ftplugin/vimwiki.lua @@ -0,0 +1,2 @@ +-- to make render-markdown render it nicely +vim.treesitter.language.register("markdown", "vimwiki") From 30adb52d3c3e9d20e7b7fdec84fa31a2f5b53f8a Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 10 Oct 2025 21:56:54 +0200 Subject: [PATCH 4/4] nvim: Add mdx filetype support Added suport for the mdx filetype. With the mdx.nvim plugin it will be recognized and applied to `*.mdx` files. The plugin also associates the markdown parser with it, and adds some queries for mdx features. Lastly, added mdx to the list of markdown-like languages in our prose module so plugins like render-markdown also recognize the language and work with it. --- nvim/.config/nvim/lazy-lock.json | 1 + nvim/.config/nvim/lua/plugins/prose.lua | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 17a3aec..06ee9ad 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -48,6 +48,7 @@ "mason.nvim": { "branch": "main", "commit": "7f265cd6ae56cecdd0aa50c8c73fc593b0604801" }, "mcphub.nvim": { "branch": "main", "commit": "85a7a659fc82da1429a2241ab61e9ce07b3db374" }, "mdeval.nvim": { "branch": "master", "commit": "0e1b248db174a9659a9ab16eb8c90ff3aec55264" }, + "mdx.nvim": { "branch": "main", "commit": "464a74be368dce212cff02f6305845dc7f209ab3" }, "mini.base16": { "branch": "main", "commit": "2eb2d2b889a8c861d1a66ec651bd0edb417d5c7f" }, "mini.files": { "branch": "main", "commit": "49c855977e9f4821d1ed8179ed44fe098b93ea2a" }, "mini.nvim": { "branch": "main", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" }, diff --git a/nvim/.config/nvim/lua/plugins/prose.lua b/nvim/.config/nvim/lua/plugins/prose.lua index a4dcf9e..ed4e512 100644 --- a/nvim/.config/nvim/lua/plugins/prose.lua +++ b/nvim/.config/nvim/lua/plugins/prose.lua @@ -13,6 +13,7 @@ end local md_like = { "markdown", + "mdx", "djot", "pandoc", "quarto", @@ -345,6 +346,12 @@ local prose_plugs = { branch = "dev", }, { "let-def/texpresso.vim", ft = { "tex" } }, + { + "davidmh/mdx.nvim", + config = true, + dependencies = { "nvim-treesitter/nvim-treesitter" }, + event = { "BufEnter *.mdx" }, -- since the plug itself defines mdx ft + }, } return prose_plugs