[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter integration on feature/tree-sitter
From: |
Theodor Thornhill |
Subject: |
Re: Tree-sitter integration on feature/tree-sitter |
Date: |
Sat, 07 May 2022 21:00:33 +0200 |
>
> Yes, thanks.
>
> However, I hoped that the font-lock and indentation are already
> integrated with tree-sitter, and all that is needed for a given
> major-mode to use it is to flip some variable. I didn't expect to
> need a completely separate major mode for C sources, for example.
Isn't that the case, though? You need to define the patterns to use,
but apart from that, there's not much to it. I don't believe
tree-sitter itself is opinionated on how saturated the font-locking
should be. As for definining completely separate major modes, I
personally think that's some of the point. All of CC Mode functionality
can be replaced by the equivalent tree-sitter one. Whether or not that
should be its own mode or behind some defcustom is up for discussion.
>
> It sounds like we are farther from the goal that I thought we were,
> and some serious work is still ahead of us to get this integrated into
> the existing major modes.
There's some manual labor involved in supporting a language. Look at
how neovim does it for an alternative:
https://github.com/nvim-treesitter/nvim-treesitter
This is a collection of queries and highlights, as well as some
functionality to download the proper definitions.
Theodor
- Re: Tree-sitter integration on feature/tree-sitter, (continued)
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/07
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/07
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/07
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/07
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/07
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/07
- Re: Tree-sitter integration on feature/tree-sitter, Yuan Fu, 2022/05/07
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/07
- Re: Tree-sitter integration on feature/tree-sitter, Stefan Monnier, 2022/05/07
- Re: Tree-sitter integration on feature/tree-sitter, Theodor Thornhill, 2022/05/07
- Re: Tree-sitter integration on feature/tree-sitter, Eli Zaretskii, 2022/05/08
- Re: Tree-sitter integration on feature/tree-sitter, Dmitry Gutov, 2022/05/08
- Re: Tree-sitter integration on feature/tree-sitter, Stefan Monnier, 2022/05/08