vim: load treesitter on VeryLazy event
This seems like a good compromise between start-up speed and it actually working :P
This commit is contained in:
parent
ab272fd138
commit
04acdd05a1
1 changed files with 10 additions and 5 deletions
|
@ -1,22 +1,27 @@
|
|||
local M = { 'nvim-treesitter/nvim-treesitter' }
|
||||
|
||||
M.build = ':TSUpdate'
|
||||
|
||||
M.cmd = {
|
||||
'TSInstall',
|
||||
'TSUpdate',
|
||||
'TSUpdateSync',
|
||||
}
|
||||
|
||||
M.dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-refactor',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
'nvim-treesitter/playground',
|
||||
}
|
||||
|
||||
M.event = 'VeryLazy'
|
||||
|
||||
M.keys = {
|
||||
{ '<leader>tp', '<cmd>TSPlaygroundToggle<cr>' },
|
||||
{ '<leader>th', '<cmd>TSHighlightCapturesUnderCursor<cr>' },
|
||||
{ '<leader>tn', '<cmd>TSNodeUnderCursor<cr>' },
|
||||
}
|
||||
|
||||
-- When lazy loading treesitter, I get a problem when I open the first file
|
||||
-- using Telescope: treesitter is used correctly in the previewer but is broken
|
||||
-- afterwards.
|
||||
M.lazy = false
|
||||
|
||||
M.config = function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {
|
||||
|
|
Loading…
Add table
Reference in a new issue