Actually with tree-sitter it's much less moving parts inside parser-generator core (5-10x LOC less then templ, but it's difficult to compare because structure differences).
My theory that I don't have to care a lot about gopls changes, because I rely on LSP protocol itself when doing conversion. I basically scan exchange JSONs for locations (sometimes recursively) that are related to `.gox` or generated `.x.go` and perform targeted patches.
About string literals completions.. I can't imagine how I could achieve even a 1/10 of feature set with this approach. Or at the end, it will turn out as something very similar to what I have, but achieved from a different starting point.
Interesting that you went the full custom-language route instead of just better gopls completion inside string literals. The tree-sitter grammar plus language server proxying to gopls is a lot of moving parts to maintain. Curious how you handle gopls version drift, since it changes behavior pretty often.
Actually with tree-sitter it's much less moving parts inside parser-generator core (5-10x LOC less then templ, but it's difficult to compare because structure differences).
My theory that I don't have to care a lot about gopls changes, because I rely on LSP protocol itself when doing conversion. I basically scan exchange JSONs for locations (sometimes recursively) that are related to `.gox` or generated `.x.go` and perform targeted patches.
About string literals completions.. I can't imagine how I could achieve even a 1/10 of feature set with this approach. Or at the end, it will turn out as something very similar to what I have, but achieved from a different starting point.
Interesting that you went the full custom-language route instead of just better gopls completion inside string literals. The tree-sitter grammar plus language server proxying to gopls is a lot of moving parts to maintain. Curious how you handle gopls version drift, since it changes behavior pretty often.