0

I'm new in the emacs world and after practicing a bit with doomemacs, I'm trying to configure vanilla emacs by myself with my own init.el file.

I have installer tree-sitter for syntax highlighting and works fine for JS file but not for TS files. My configuration for tree-sitter is the next:

(use-package tree-sitter
  :ensure t
  :config
  (global-tree-sitter-mode)
  (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))

(use-package tree-sitter-langs
  :ensure t
  :after tree-sitter)

Anyone has the same problem? or I'm missing something in my configuration? Thanks!

double-beep
  • 5,031
  • 17
  • 33
  • 41
acanimal
  • 4,800
  • 3
  • 32
  • 41
  • This has nothing to do with your problem, but `use-package` provides a shorthand for adding hooks: your whole `(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)` can be replaced by `:hook (tree-sitter-after-on . tree-sitter-hl-mode)` (note that I removed `-hook` in the hook name). – jthulhu Dec 18 '22 at 09:06

0 Answers0