From 7141393f1284f518e4393da24ebda0a03111e6fd Mon Sep 17 00:00:00 2001 From: kiyan Date: Sat, 9 Apr 2022 14:41:07 +0200 Subject: fix(modules): enabling disabling per buffer and globally When a module is disabled by default in the config, running TSBufEnable will not enable the module because the is_enabled function will always return false, thus the module not being enabled. Also, disabling/enabling the buffers is flaky. This commit adds per buffer check when the module is not disabled. It also makes the enable and disable more indempotent. i've also renamed TS*All to TS*. Fixes #2754 --- doc/nvim-treesitter.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/nvim-treesitter.txt b/doc/nvim-treesitter.txt index b6995ebc5..7ffa43f2b 100644 --- a/doc/nvim-treesitter.txt +++ b/doc/nvim-treesitter.txt @@ -269,8 +269,8 @@ Toggle (enable if disabled, disable if enabled) {module} on the current buffer. A list of modules can be found at |:TSModuleInfo| - *:TSEnableAll* -:TSEnableAll {module} [{language}]~ + *:TSEnable* +:TSEnable {module} [{language}]~ Enable {module} for the session. If {language} is specified, enable module for the session only for this @@ -278,8 +278,8 @@ particular language. A list of modules can be found at |:TSModuleInfo| A list of languages can be found at |:TSInstallInfo| - *:TSDisableAll* -:TSDisableAll {module} [{language}]~ + *:TSDisable* +:TSDisable {module} [{language}]~ Disable {module} for the session. If {language} is specified, disable module for the session only for this @@ -287,8 +287,8 @@ particular language. A list of modules can be found at |:TSModuleInfo| A list of languages can be found at |:TSInstallInfo| - *:TSToggleAll* -:TSToggleAll {module} [{language}]~ + *:TSToggle* +:TSToggle {module} [{language}]~ Toggle (enable if disabled, disable if enabled) {module} for the session. If {language} is specified, toggle module for the session only for this -- cgit v1.2.3-70-g09d2