Will Kate be getting tree-sitter support? This is the main question, while I veer off in other thoughts to come…
Something I had just noticed when editing a shell script was the Output tab was flashing (which is good), so I took a look and saw mention of the existence of a Bash LSP.
That got me really intrigued since I’m aware of LSPs ever since using C# in vscode.
I looked at LSP packages offered for Arch, which were quite a bit, and that got me to thinking of how I would like to have a global location for extensions, and I saw there’s a parameter for that.
So if I were to install the bash LSP package, maybe I wouldn’t need to even have an extension installed for vscode. That the package would work with kate AND vscode.
(odd aside, I just had a notification that this message was being drafted in another window and I need to refresh. I had no other window open for this discuss forum… Thank goodness this draft was saved.)
Then to add to that, I saw tree-sitter mentioned somewhere while I was looking at info about bash LSP…
My first encounter with tree-sitter stems from building gettext I think, which “recently”(? a year?) had included that as a dependency. I knew nothing of its purpose, and just went along with it.
Now my awareness is that it’s a sort of generic LSP? If so, that sounds like a great idea, like having a common base library to build off of.
So not only would we be served well by having a singular location for global LSPs, we would even have a singular common LSP base for offshoots like bash and c#.
Having shared commons be set by standards is a good thing (XDG?). Like having binaries in a single directory (eg. /usr/bin (for system), /usr/local/bin (for user system builds), ~/.share/bin (? for user-only build)), vs windows basically putting the entire package in a singular location, which is nice from an (un/)installation perspective (though you may still have at least user/registry-related stragglers remain), but I figure unfriendly from a PATH-related perspective. Minimize unnecessary duplication.
Having installed the bash tree-sitter, I see that it’s just a library…
Again, not knowing squat about tree-sitter, my expectation/hope for minimization is that a program like Kate would look at the doc being worked on, call a central TS function to see if a related/relevant TS exists, then call a common/generic TS function to interface with that related TS.
This, as opposed to having separate LSP binaries you may have to run the text on and process the output, all with having non-standard implementations. Dunno, just some brainstorming…