Closed Aneeqasif closed 1 year ago
Did you take a moment to check out the help file?
:h mkdx-setting-toc-update-on-write
for example? If you did, please include what you've tried.
Yeah i looked at the help tags and i have added alot of things in config and one option was causing this issue so this is fix now
@Aneeqasif can you share what option was causing this problem for you? This happens to me, as well.
Hmm, I may have solved this by not lazy loading mkdx only for markdown files. With lazy.nvim:
return {
"SidOfc/mkdx",
-- ft = { "markdown" }, -- 👈 I think this was the problem
config = function()
vim.g["mkdx#settings"] = {
highlight = { enable = 1 },
enter = { shift = 1 },
links = { external = { enable = 1 } },
toc = { text = "Table of Contents", update_on_write = 1 },
fold = { enable = 1 },
tokens = { strike = "~" },
}
-- Unset the gx mapping from mkdx so that we can correctly open URLs in the browser
vim.keymap.set("n", "<Plug>", "<Plug>(mkdx-gx)")
end,
}
OS type:
Vim:
Vim version:
NVIM v0.9.1 Build type: Release LuaJIT 2.1.0-beta3
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
is there any way to stop generation of toc . (each time i open that file again a new toc duplicate is there at top) i donot need toc on every doc. i just want it on demand on some keybind or command etc is there anything for me?