Treesitter autocmd to start by itself

master
Wynd 2026-01-20 01:39:17 +02:00
parent 8d9d97852e
commit 35e56bbbd9
1 changed files with 6 additions and 3 deletions

View File

@ -63,10 +63,13 @@ return {
"desktop", "desktop",
}) })
-- Prize for most retarded upgrade goes to....
-- Auto enable TS if language is installed because it can't do that by myself anymore
vim.api.nvim_create_autocmd("FileType", { vim.api.nvim_create_autocmd("FileType", {
pattern = { "<filetype>" }, callback = function(args)
callback = function() if vim.list_contains(ts.get_installed(), vim.treesitter.language.get_lang(args.match)) then
vim.treesitter.start() vim.treesitter.start(args.buf)
end
end, end,
}) })