Longer timeout
This commit is contained in:
parent
3c4eafa461
commit
7adee61133
1 changed files with 4 additions and 4 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue