3 ms·
Interestingly, treesitter is designed for this space (parsing invalid structures with a time component) but it’s still not used as a base for LSPs. I once asked
by aidos 3y ago
Interestingly, treesitter is designed for this space (parsing invalid structures with a time component) but it’s still not used as a base for LSPs. I once asked why on HN and people that know more than me said it wasn’t suitable.
- vkazanov 3y agotree-sitter definitely can be used as a incremental parser for an LSP. But the original purpose was and still is to provide a standard format for an editor-agnostic way to parse languages. As somebody who wrote a tree-sitter grammar recently I can confirm that the library definitely has its share of... Interesting choices. But there's nothing else like it as most parser generators are non-incremental, don't do generalized parsing and don't provide decent error recovery.
- bch 3y ago> has its share of… Interesting choices Curious to hear more.
- vkazanov 3y agoWell, nothing truly horrible but here are things I find inconvenient (but working nevertheless) when using the sdk. 1. NodeJS-based utilities. The tooling around js doesn't lean itself well to integration with with the dev's environment. 2. The sdk itself is a mix of Rust, javascript and C. I'd say that this is at least one language too many - makes it harder to contribute. Ideally such fundamental projects should be as simple and homogeneous as possible. 3. I keep wondering if generating languages other than C should be supported. The core idea of the library is brilliant either way so it sort of compensates all of the above.