aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/nvim/.config
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2023-10-24 17:34:52 -0500
committerToby Vincent <tobyv@tobyvin.dev>2023-10-24 17:34:52 -0500
commitef6efa82a15f629c22e73917557b2d44be3a31c5 (patch)
treed20e6deab08247fd8b1a7cfbe5ffbcd7b90a2075 /nvim/.config
parentf93d79db6b6361fa94e85e7d162b0446c4a7c516 (diff)
feat(nvim): add treesitter parsers install script
Diffstat (limited to 'nvim/.config')
-rw-r--r--nvim/.config/nvim/lua/plugins/treesitter.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua
index 21bdcad..16676ed 100644
--- a/nvim/.config/nvim/lua/plugins/treesitter.lua
+++ b/nvim/.config/nvim/lua/plugins/treesitter.lua
@@ -3,6 +3,15 @@ local M = {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
event = "BufReadPost",
+ cmd = {
+ "TSInstall",
+ "TSInstallInfo",
+ "TSInstallSync",
+ "TSModuleInfo",
+ "TSUninstall",
+ "TSUpdate",
+ "TSUpdateSync",
+ },
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
"mfussenegger/nvim-ts-hint-textobject",
@@ -48,7 +57,6 @@ local M = {
"scss",
"sql",
"svelte",
- "teal",
"toml",
"tsx",
"typescript",
@@ -56,6 +64,9 @@ local M = {
"vue",
"yaml",
},
+ -- BUG: Required for TSUpdateSync to work in headless.
+ -- Ref: https://github.com/nvim-treesitter/nvim-treesitter/issues/2900
+ sync_install = #vim.api.nvim_list_uis() == 0,
indent = {
enable = true,
},