mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 00:40:06 -04:00
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
This commit is contained in:
parent
e3adb39586
commit
7141393f12
3 changed files with 45 additions and 19 deletions
|
|
@ -136,8 +136,8 @@ Each module can also be enabled or disabled interactively through the following
|
|||
```vim
|
||||
:TSBufEnable {module} " enable module on current buffer
|
||||
:TSBufDisable {module} " disable module on current buffer
|
||||
:TSEnableAll {module} [{ft}] " enable module on every buffer. If filetype is specified, enable only for this filetype.
|
||||
:TSDisableAll {module} [{ft}] " disable module on every buffer. If filetype is specified, disable only for this filetype.
|
||||
:TSEnable {module} [{ft}] " enable module on every buffer. If filetype is specified, enable only for this filetype.
|
||||
:TSDisable {module} [{ft}] " disable module on every buffer. If filetype is specified, disable only for this filetype.
|
||||
:TSModuleInfo [{module}] " list information about modules state for each filetype
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue