Longer timeout

This commit is contained in:
Warwick New 2026-03-03 13:51:28 +00:00
parent 3c4eafa461
commit 7adee61133

View file

@ -4,13 +4,13 @@ return {
build = ':TSUpdate',
config = function()
-- Auto launch tree-sitter
require('nvim-treesitter').get_available()
local ts = require('nvim-treesitter')
vim.api.nvim_create_autocmd('FileType', {
pattern = require('nvim-treesitter').get_available(),
pattern = ts.get_available(),
callback = function(event)
-- Auto install languages
if event.match ~= require('nvim-treesitter').get_installed() then
require('nvim-treesitter').install({ event.match }):wait(3000) -- 30 sec timeout
if event.match ~= ts.get_installed() then
ts.install({ event.match }):wait(30000) -- 30 sec timeout
end
-- syntax highlighting, provided by Neovim
vim.treesitter.start()