From 89cb79305d9fa0e9e6b5babffa761266a3abca03 Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Fri, 17 Jan 2025 20:34:11 +0100 Subject: vim-markdown: use mostly stock config and restore conceal I've added an autocmd to conceal only out of insert mode --- lua/plugins/lang/markdown.lua | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lua/plugins/lang/markdown.lua b/lua/plugins/lang/markdown.lua index 5731ff2..cef35bd 100644 --- a/lua/plugins/lang/markdown.lua +++ b/lua/plugins/lang/markdown.lua @@ -41,15 +41,20 @@ return { "preservim/vim-markdown", dependencies = { "godlygeek/tabular" }, init = function() - -- concealing is shit - vim.g.vim_markdown_conceal = 0 - vim.g.vim_markdown_conceal_code_blocks = 0 - vim.g.vim_markdown_frontmatter = 0 - vim.g.vim_markdown_strikethrough = 0 + -- Specific plugin config is here. However, there are some autocmds + -- and additional settings that _interact_ with this plugin in + -- ftplugin/markdown.lua. - vim.g.vim_markdown_auto_insert_bullets = 0 - vim.g.vim_markdown_new_list_item_indent = 0 - vim.g.vim_markdown_folding_disabled = 1 + -- highlight front matter + vim.g.vim_markdown_frontmatter = 1 -- YAML + vim.g.vim_markdown_toml_frontmatter = 1 -- TOML + vim.g.vim_markdown_json_frontmatter = 1 -- JSON + + -- scratch using two tildes ie ~~ + vim.g.vim_markdown_strikethrough = 1 + + -- indent new list items by 2 spaces + vim.g.vim_markdown_new_list_item_indent = 2 end, ft = { "markdown" }, }, -- cgit v1.2.3