Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
tree-sitter-winscp
A Tree-sitter parser for [WinSCP's scripting and task automation language](https://winscp.net/eng/docs/scripting).
-
semgrep
Lightweight static analysis for many languages. Find bug variants with patterns that look like source code.
I use neovim, the tree-sitter support is great especially with nvim-treesitter which means I can just run `TSInstall ` and I'm done.
Writing a tree-sitter parser is not that easy though. I wrote tree-sitter-templ to parse templ files and I still have a hard time identifying some parsing errors, especially since I had to implement a custom external scanner which in my experience was the source of a lot of bugs.
[0]: https://github.com/vrischmann/tree-sitter-templ
Neovim supports treesitter based selections and "jumps", which I think are awesome
https://www.reddit.com/r/neovim/comments/r10llx/the_most_ama...
Or
https://github.com/RRethy/nvim-treesitter-textsubjects
Helix also supports them by default
It's not easy, but after a while it does become somewhat meditative. I think the TypeScript nature of it helps a lot.
I picked up Neovim at my last job and got a decent start on a Tree-sitter parser off hours for the WinSCP batch programming language of all things. But then I couldn't get it to actually install correctly into Neovim, and I switched jobs before I figured it out. :(
It was really cool, though! Love parsers. https://github.com/hiAndrewQuinn/tree-sitter-winscp
> Not sure I understand your point.
The problem is using Treesitter (for syntax highlighting and "semantic movements") and an LSP at the same time. So if your language has a LSP, using Treesitter additionally is redundant at best and introduces inconcistency at worst.
I'm not talking about using Treesitter as the parser for the LSP.
> Most popular languages have language-specific tools
I'd say even less popular langauges like Coq^H^H^HRocq, Lean 4, Koka, Idris, Unison, ... have their "own" tools, I do not know of a language that uses a Treesitter parser in its LSP, but I do know about tools like https://semgrep.dev/ (written in OCaml) and Github's code search which use Treesitter.