Skip to content
Discussion options

You must be logged in to vote

Ah, luasnip gets the filetypes for the cursor-position from ft_func (set during setup), 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 passing

load_ft_func = require("luasnip.extras.filetype_functions").extend_load_ft({
	markdown = {"latex", "tex"}
}),

to setup as well.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Aceticia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants