bash-language-server icon indicating copy to clipboard operation
bash-language-server copied to clipboard

[question] possibility to write blog post about this code

Open ericoporto opened this issue 4 years ago • 5 comments

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.

ericoporto avatar May 23 '20 17:05 ericoporto

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)?

skovhus avatar May 23 '20 17:05 skovhus

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:

Thanks for listening and you can close this issue anytime :)

ericoporto avatar May 23 '20 18:05 ericoporto

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.

skovhus avatar May 23 '20 19:05 skovhus

@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

nikita-skobov avatar May 26 '20 02:05 nikita-skobov

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. :)

ericoporto avatar Jun 23 '20 16:06 ericoporto