Skip to content

Commit

Permalink
build after load
Browse files Browse the repository at this point in the history
  • Loading branch information
davidosomething committed May 13, 2023
1 parent 8cd21b6 commit cc36137
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nvim/lua/dko/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ return {
-- https://github.com/nvim-treesitter/nvim-treesitter/
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
build = function ()
vim.g.needs_ts_update = 1
end,
cmd = { "TSUpdate" },
event = { "BufReadPost", "BufNewFile" }, -- this cuts 20ms
config = function()
Expand Down Expand Up @@ -147,6 +149,10 @@ return {
matchup = { enable = true },
})

if vim.g.needs_ts_update == 1 then
vim.cmd('TSUpdate')
end

-- =====================================================================
-- Aliases
-- =====================================================================
Expand Down

0 comments on commit cc36137

Please sign in to comment.