Skip to content

Commit

Permalink
Don't depend on lsp-mode for treesit
Browse files Browse the repository at this point in the history
  • Loading branch information
pkryger committed Sep 26, 2023
1 parent f5e5753 commit ca4683c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions modules/init-treesit.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
(defun exordium--add-forward-ts-hook (mode)
(when-let ((ts-hook (intern (concat (symbol-name mode) "-ts-mode-hook")))
(hook (intern (concat (symbol-name mode) "-mode-hook")))
(_ (and (symbolp ts-hook) (symbolp hook))))
((and (symbolp ts-hook) (symbolp hook))))
(add-hook ts-hook
#'(lambda ()
(run-hooks hook)))))
#'(lambda ()
(run-hooks hook)))))

(when exordium-treesit-modes-enable
(unless (getenv "ci_tests")
Expand All @@ -17,15 +17,13 @@
(message "Enabling treesit-auto and builtin treesit")
(use-package treesit-auto
:requires treesit
:after lsp-mode
:config
(setq treesit-auto-install 'prompt)
(global-treesit-auto-mode))

(use-package treesit
:requires treesit
:ensure nil
:after lsp-mode
:config
(mapc #'exordium--add-forward-ts-hook
'(
Expand Down

0 comments on commit ca4683c

Please sign in to comment.