New to Emacs having problems with Treesitter

This page summarizes the projects mentioned and recommended in the original post on /r/emacs

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • eglot

    A client for Language Server Protocol servers

    ```lisp ;; we choose this name instead of tsx-mode so that eglot can automatically figure out language for server ;; see https://github.com/joaotavora/eglot/issues/624 and https://github.com/joaotavora/eglot#handling-quirky-servers (define-derived-mode typescriptreact-mode typescript-mode "TypeScript TSX") (add-to-list 'auto-mode-alist '("\.tsx\'" . typescriptreact-mode))

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • tsi.el

    treesitter-based indendentation for emacs 28 and 27

    ;; use our derived mode for tsx files (add-to-list 'auto-mode-alist '("\.tsx\'" . typescriptreact-mode)) ;; by default, typescript-mode is mapped to the treesitter typescript parser ;; use our derived mode to map .tsx -> typescriptreact-mode -> treesitter tsx (add-to-list 'tree-sitter-major-mode-language-alist '(typescriptreact-mode . tsx)) ;; https://github.com/orzechowskid/tsi.el/ ;; great tree-sitter-based indentation for typescript/tsx, css, json (quelpa '(tsi :fetcher github :repo "orzechowskid/tsi.el")) (add-hook 'typescript-mode-hook (lambda () (tsi-typescript-mode 1)))) ```

  • tsx-mode.el

    a batteries-included Emacs major mode for Typescript, Javascript, TSX, and JSX files

    (use-package tree-sitter :ensure t :config (global-tree-sitter-mode) (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode) ;; by default, typescript-mode is mapped to the treesitter typescript parser ;; use our derived mode to map .tsx -> typescriptreact-mode -> treesitter tsx (add-to-list 'tree-sitter-major-mode-language-alist '(typescriptreact-mode . tsx)) ;; if you want to look into better tsx and ts intendation support, consider ;; https://github.com/orzechowskid/tsx-mode.el ;; https://github.com/orzechowskid/tsi.el

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

Did you konow that Emacs Lisp is
the 21st most popular programming language
based on number of metions?