From 7adee61133d070e902e8d442adae3316b358bf30 Mon Sep 17 00:00:00 2001 From: Warwick New Date: Tue, 3 Mar 2026 13:51:28 +0000 Subject: [PATCH] Longer timeout --- lua/plugins/treesitter.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 67b8209..605c8fb 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -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()