docs(tree-sitter): replace {add,remove}-hook!

these are redundant in these contexts
This commit is contained in:
Jeetaditya Chatterjee 2022-04-02 02:16:11 +01:00
parent 869aefb523
commit c6a006dd68
No known key found for this signature in database
GPG key ID: 09D54CECD2132B91

View file

@ -82,7 +82,7 @@ If you wish to disable tree sitter text objects then you can just remove
=+tree-sitter-keys-mode= from the language mode hook, for example if we did not =+tree-sitter-keys-mode= from the language mode hook, for example if we did not
want it for ruby we would use this snippet want it for ruby we would use this snippet
#+begin_src emacs-lisp #+begin_src emacs-lisp
(remove-hook! 'ruby-mode-hook #'+tree-sitter-keys-mode) (remove-hook 'ruby-mode-hook #'+tree-sitter-keys-mode)
#+end_src #+end_src
** Adding your own text objects ** Adding your own text objects
@ -105,9 +105,9 @@ If you want to disable highlighting by default you can add a
If you only want it for certain modes then If you only want it for certain modes then
#+begin_src emacs-lisp #+begin_src emacs-lisp
(remove-hook! 'tree-sitter-after-on-hook #'tree-sitter-hl-mode) (remove-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)
(add-hook! 'MAJOR-MODE-HOOK #'tree-sitter-hl-mode) (add-hook 'MAJOR-MODE-HOOK #'tree-sitter-hl-mode)
#+end_src #+end_src
* Troubleshooting * Troubleshooting