bash-language-server
bash-language-server copied to clipboard
[question] possibility to write blog post about this code
Hi, this looks possibly to be the best documented code on using Tree Sitter and Type Script to build a Language Server Protocol.
If you find time in the future, please consider a write up on how you made it, and the particularities on Bash and what could be repurposed when implementing other languages.
Please keep it up, this code is really good.
Thanks @ericoporto!
Great suggestion. We could make a blog post on this. Any specific topics you would like it to include? Who would be the audience (Someone wanting to do an LSP server using treesitter)?
My use case is: I have a working Tree Sitter implementation for a language in Atom, so I would like to build a Language Server with it so I can use it on VSCode! :)
I just started reading and experimenting with the code. What I could piece together:
- server/src/config.ts this is where I change file extension
- server/src/parser.ts this is where I change the wasm parser name
- server/src/reservedWords.ts this appears to be the reserved keywords, but I am unsure on the difference for built-ins (in server/src/builtins.ts).
Thanks for listening and you can close this issue anytime :)
Which language are you writing the LS for?
Seems your questions are rather code/implementation. We could do some more outlining of the code in this project.
@ericoporto
server/src/reservedWords.ts this appears to be the reserved keywords, but I am unsure on the difference for built-ins (in server/src/builtins.ts).
reserved words are relevant for any language, but in bash builtins
are functions that are included in bash by default https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html
Hey, thanks @skovhus and @nikita-skobov ! I forked this code and basically just switched the wasm tree sitter parser and the metadata. I will later add the language and "VM" specifics, it's for AGS Script, a Script language used in Adventure Game Studio. Wanted to quickly experiment with LSP and your code was very useful, it's very well structured. You can close this issue. :)