summaryrefslogtreecommitdiff
path: root/lua/plugins/lang/markdown.lua
diff options
context:
space:
mode:
authorChristian Segundo2025-01-17 20:34:11 +0100
committerChristian Segundo2025-01-17 20:34:11 +0100
commit89cb79305d9fa0e9e6b5babffa761266a3abca03 (patch)
treee2f1222ccaa587b3ddb479d68d841557265c0ba4 /lua/plugins/lang/markdown.lua
parent3f7563540e835b39982e8316cb1d7cdbd443ad14 (diff)
downloadconfig-89cb79305d9fa0e9e6b5babffa761266a3abca03.tar.gz
vim-markdown: use mostly stock config and restore conceal
I've added an autocmd to conceal only out of insert mode
Diffstat (limited to 'lua/plugins/lang/markdown.lua')
-rw-r--r--lua/plugins/lang/markdown.lua21
1 files 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" },
},