From 2ad0da42723872dba5d2c20dfcd89cffe9343591 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 11 Mar 2024 22:07:14 +0800 Subject: [PATCH] perf(treesitter): add default setup function --- autoload/SpaceVim/layers/treesitter.vim | 6 ++++++ config/plugins/nvim-treesitter-0.9.1.vim | 1 + lua/spacevim/treesitter.lua | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 config/plugins/nvim-treesitter-0.9.1.vim create mode 100644 lua/spacevim/treesitter.lua diff --git a/autoload/SpaceVim/layers/treesitter.vim b/autoload/SpaceVim/layers/treesitter.vim index 694940ddd..3deaad563 100644 --- a/autoload/SpaceVim/layers/treesitter.vim +++ b/autoload/SpaceVim/layers/treesitter.vim @@ -33,6 +33,12 @@ function! SpaceVim#layers#treesitter#health() abort return 1 endfunction +function! SpaceVim#layers#treesitter#setup() abort + + lua require('spacevim.treesitter').setup() + +endfunction + function! SpaceVim#layers#treesitter#loadable() abort return has('nvim') diff --git a/config/plugins/nvim-treesitter-0.9.1.vim b/config/plugins/nvim-treesitter-0.9.1.vim new file mode 100644 index 000000000..dad1b43be --- /dev/null +++ b/config/plugins/nvim-treesitter-0.9.1.vim @@ -0,0 +1 @@ +call SpaceVim#layers#treesitter#setup() diff --git a/lua/spacevim/treesitter.lua b/lua/spacevim/treesitter.lua new file mode 100644 index 000000000..d5f2a4dd3 --- /dev/null +++ b/lua/spacevim/treesitter.lua @@ -0,0 +1,20 @@ +local M = {} + +function M.setup() + require('nvim-treesitter.configs').setup({ + ensure_installed = {}, + + sync_install = false, + + auto_install = false, + + ignore_install = {}, + + highlight = { + enable = false, + disable = {"lua"}, + additional_vim_regex_highlighting = false, + }, + }) +end +return M