fix(fold): only enable ts-fold-mode in tree-sitter buffers

ts-fold-mode is buffer-local, and will complain if activated in a buffer
tree-sitter doesn't support (e.g. fundamental-mode). global-ts-fold-mode
will filter based on tree-sitter-mode's activation and language support.

Fix: #7895
This commit is contained in:
Henrik Lissner 2024-06-25 02:44:14 -04:00
parent 1ea2b58fe6
commit 7ce9a99583
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -86,6 +86,7 @@
:config
(vimish-fold-global-mode +1))
(use-package! ts-fold
:when (modulep! :tools tree-sitter)
:after tree-sitter
@ -97,4 +98,4 @@
:inherit font-lock-comment-face
:weight light))
(setq ts-fold-replacement " [...] ")
(ts-fold-mode +1))
(global-ts-fold-mode +1))