Questions tagged [tree-sitter]
6 questions
1
vote
1 answer
How to highlight documentation comments with tree-sitter?
In c-mode it's possible to show doxygen comments /** ... */ using font-lock-doc-face. See: docs for c-doc-comment-style.
How can this be done in c-ts-mode ?
I can find documentation pointing to treesit-font-lock-settings but this is mainly focusing…

ideasman42
- 8,375
- 1
- 28
- 105
1
vote
2 answers
C/C++ with tree sitter: how to change indent?
I use Emacs with tree sitter for c++ code (c++-ts-mode).
With usual c++-mode I've used this fix for me:
(c-set-offset 'inline-open '0)
but I don't understand how to do it in new c++-ts-mode.
In general I want an indent to be like this:
void…

Sergey
- 211
- 1
- 6
0
votes
0 answers
Ruby Eglot Tree-Sitter Configuration
Has anyone managed an eglot and tree-sitter configuration for ruby that has a reasonably full feature set. I have both activated, but here are some things that don't work:
xref jumping
code folding
documentation
I have tried both ruby-lsp and…

Daniel Doherty
- 418
- 4
- 12
0
votes
1 answer
language specific tree-sitter major mode wont show up
I'm using GNU Emacs 29.1 and have installed the tree-sitter haskell grammar: libtree-sitter-haskell.so via treesit-install-language-grammar but somehow haskell-ts-mode wont show up as a major mode under M-x.
However rust-ts-mode shows up even if I…

hubbledeepfield
- 13
- 4
0
votes
2 answers
How do I check if the current buffer has a treesit parser?
Starting with Emacs 29, we've got native TreeSitter support using treesit. My question is: how do I know I can use treesit-* functions in the current buffer? The feature check only checks if Emacs itself has been compiled with treesit-support.…

Aleksandar Dimitrov
- 101
- 3
0
votes
0 answers
How do I use a local tree-sitter grammar in my emacs major mode?
I want to create a new major mode for a language with tree-sitter. I am working on the tree-sitter parser locally and It's working (tested in neovim and helix)
Now I want to tell emacs to use the grammar to do syntax highlighting and eventually use…