Added a timeout for install TSGrammar automatically
This commit is contained in:
parent
2862f6740d
commit
ede489d16e
2 changed files with 12 additions and 3 deletions
|
|
@ -5,7 +5,8 @@
|
|||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "561126520034a1dac2f78ab063db025d12555998" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a324581a3c83fdacdb9804b79de1cbe00ce18550" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
|
||||
|
|
@ -24,6 +25,9 @@
|
|||
"nvim-treesitter": { "branch": "main", "commit": "cb2cb74f3c3cbbcc17e79cada2060165d616d849" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "737cf6c657898d0c697311d79d361288a1343d50" },
|
||||
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||
"org-bullets.nvim": { "branch": "main", "commit": "21437cfa99c70f2c18977bffd423f912a7b832ea" },
|
||||
"org-roam.nvim": { "branch": "main", "commit": "cf00a0b3797ee3370c2ca2bdedbc04b2f5309a1e" },
|
||||
"orgmode": { "branch": "master", "commit": "f3ea61f6d71486c9062d40efe3c882050758e9b3" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
|
||||
|
|
|
|||
|
|
@ -3,10 +3,15 @@ return {
|
|||
lazy = false,
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
-- Auto launch for every TSInstalled filetype
|
||||
-- Auto launch tree-sitter
|
||||
require('nvim-treesitter').get_available()
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = require('nvim-treesitter').get_installed(),
|
||||
pattern = require('nvim-treesitter').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
|
||||
end
|
||||
-- syntax highlighting, provided by Neovim
|
||||
vim.treesitter.start()
|
||||
-- Use regex highlighting as well as tree-sitter
|
||||
|
|
|
|||
Loading…
Reference in a new issue