From 2ff1ba46e196fe26c1349f1474154e2e39193c10 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Fri, 1 Oct 2021 18:56:46 +0530 Subject: [PATCH] nvim: plugins: Add TSUpdate as post install hook for treesitter --- nvim/.config/nvim/lua/plugins.lua | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 1e0798e..9ecc7fe 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -88,11 +88,22 @@ local init = function () } -- treesitter based syntax highlighting use { - 'nvim-treesitter/nvim-treesitter-textobjects', - requires = { 'nvim-treesitter/nvim-treesitter' }, + 'nvim-treesitter/nvim-treesitter', + requires = { + { + "nvim-treesitter/playground", + after = "nvim-treesitter", + cmd = { "TSPlaygroundToggle", "TSHighlightCapturesUnderCursor" }, + }, + { + "nvim-treesitter/nvim-treesitter-textobjects", + module = "nvim-treesitter-textobjects", + after = "nvim-treesitter", + }, + }, config = "require('treesitter')", + run = ':TSUpdate' } - use 'nvim-treesitter/playground' -- All writing needs use 'lervag/vimtex' use 'vim-pandoc/vim-pandoc'