-
How to enable latex snippets in math blocks of markdown files? I'm trying to write latex in markdown but don't want to copy all the snippets from latex. For example, using the snippets from here, how would one approach it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Ah, luasnip gets the filetypes for the cursor-position from load_ft_func = require("luasnip.extras.filetype_functions").extend_load_ft({
markdown = {"latex", "tex"}
}), to |
Beta Was this translation helpful? Give feedback.
Ah, luasnip gets the filetypes for the cursor-position from
ft_func
(set duringsetup
), we ship a function to use treesitter to resolve the filetype at the cursor (require("luasnip.extras.filetype_functions").from_pos_or_filetype
).You'll also want to update
load_ft_func
to automatically lazy-load latex/tex-filetype for markdown-files, this can be done by passingto
setup
as well.