Open frogiraffe opened 11 months ago
Ah yes, this is currently not supported - there are two ways to solve this: either extend tex snippets to markdown, or make some changes to the current snippet expansion conditions so it works seamlessly on markdown. I'd like to implement the latter, and it'll involve some treesitter code, which I'm not immediately familiar with. That being said, I'll do my best to add it in soon, and I'll let you know when changes have been pushed.
Is there any way to make the snippets work in markdown files like they did in here. I use obsidian to take notes so i only use "$$math$$" in the markdown files. I tried to understand how it works but unfortunately im not experienced with custom snippets
Put this line some where above you snippets in markdown.lua
:
-- in a markdown file: search for json, then tex or anything else you'd like it to.
require("luasnip").filetype_extend("markdown", { "json", "tex" })
Then hook the conditions
or something similar to Conditional expansion into your markdown
without worrying about VimTeX.
Is there any way to make the snippets work in markdown files like they did in here. I use obsidian to take notes so i only use "$$math$$" in the markdown files. I tried to understand how it works but unfortunately im not experienced with custom snippets