Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

File mode specification error: (wrong-type-argument treesit-node-p typescript) #114

Open
apoorv569 opened this issue Aug 30, 2024 · 0 comments

Comments

@apoorv569
Copy link

Here is my treesit config,

(use-package treesit
  :config
  (treesit-major-mode-setup)
  (setq treesit-language-source-alist
    '((bash "https://github.com/tree-sitter/tree-sitter-bash")
      (c "https://github.com/tree-sitter/tree-sitter-c")
      (cmake "https://github.com/uyha/tree-sitter-cmake")
      (common-lisp "https://github.com/theHamsta/tree-sitter-commonlisp")
      (cpp "https://github.com/tree-sitter/tree-sitter-cpp")
      (css "https://github.com/tree-sitter/tree-sitter-css")
      (csharp "https://github.com/tree-sitter/tree-sitter-c-sharp")
      (elisp "https://github.com/Wilfred/tree-sitter-elisp")
      (go "https://github.com/tree-sitter/tree-sitter-go")
      (go-mod "https://github.com/camdencheek/tree-sitter-go-mod")
      (html "https://github.com/tree-sitter/tree-sitter-html")
      (js . ("https://github.com/tree-sitter/tree-sitter-javascript" "master" "src"))
      (json "https://github.com/tree-sitter/tree-sitter-json")
      (lua "https://github.com/Azganoth/tree-sitter-lua")
      (make "https://github.com/alemuller/tree-sitter-make")
      (markdown "https://github.com/ikatyang/tree-sitter-markdown")
      (python "https://github.com/tree-sitter/tree-sitter-python")
      (r "https://github.com/r-lib/tree-sitter-r")
      (rust "https://github.com/tree-sitter/tree-sitter-rust")
      (toml "https://github.com/tree-sitter/tree-sitter-toml")
      (tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src"))
      (typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))
      (yaml "https://github.com/ikatyang/tree-sitter-yaml"))))

here is treesit-auto config,

(use-package treesit-auto
  :custom
  (treesit-auto-install 'prompt)
  :config
  (treesit-auto-add-to-auto-mode-alist 'all)
  (global-treesit-auto-mode))

Now when I open a typescript file I get this error,

File mode specification error: (wrong-type-argument treesit-node-p typescript)

and the file looks like this,
2024-08-30_15-36

there is no syntax highlighting at all.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant