From 5c66d9d9c9caaafa9fdee9824f704510d51ad6e7 Mon Sep 17 00:00:00 2001 From: Pratik Tripathy Date: Mon, 4 Aug 2025 11:13:41 +0530 Subject: [PATCH] style(neovim): Markdown render & formatting updates - Render markdown: nit: remove all `render_modes` incorrect configs - Render markdown: add blink completions for checkboxes - Render markdown: Disable indent - `indent-blankline` already takes care of it - Render markdown: Use `obsidian` preset configuration - Markdownlint: More rules --- .../nvim/lua/plugins/lang-markdown.lua | 29 ++++--------------- common/.config/templates/markdownlint.json | 2 ++ 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/common/.config/nvim/lua/plugins/lang-markdown.lua b/common/.config/nvim/lua/plugins/lang-markdown.lua index 1aa900e..2f3160d 100644 --- a/common/.config/nvim/lua/plugins/lang-markdown.lua +++ b/common/.config/nvim/lua/plugins/lang-markdown.lua @@ -30,42 +30,23 @@ return { vim.cmd(string.format([[highlight Headline6Fg cterm=bold gui=bold guifg=%s]], color6_bg)) end, opts = { + preset = "obsidian", code = { - render_modes = true, sign = false, width = "block", - border = "thick", + border = "thin", position = "right", language_name = false, right_pad = 1, }, heading = { - sign = false, icons = { "󰼏 ", "󰼐 ", "󰼑 ", "󰼒 ", "󰼓 ", "󰼔 " }, + sign = false, width = "block", right_pad = 1, - -- position = { "right" }, - }, - paragraph = { - render_modes = true, - }, - bullet = { - render_modes = true, - }, - checkbox = { - render_modes = true, - }, - quote = { - render_modes = true, - }, - pipe_table = { - preset = "round", - }, - indent = { - enabled = true, - render_modes = true, - skip_heading = true, }, + indent = { enabled = false, skip_heading = true, icon = "" }, + completions = { blink = { enabled = true } }, }, ft = { "markdown", "norg", "rmd", "org" }, config = function(_, opts) diff --git a/common/.config/templates/markdownlint.json b/common/.config/templates/markdownlint.json index 6f88d24..e246374 100644 --- a/common/.config/templates/markdownlint.json +++ b/common/.config/templates/markdownlint.json @@ -5,8 +5,10 @@ "MD038": false, // allow spaces inside code span elements "MD051": false, // do NOT check #links should match actual headings in the document "MD003": { "style": "consistent" }, + "MD004": { "style": "consistent" }, "MD007": { "indent": 4 }, "MD029": { "style": "ordered" }, + "MD035": { "style": "consistent" }, "MD046": { "style": "fenced" }, "MD049": { "style": "asterisk" }, "MD050": { "style": "asterisk" }