-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Simplicity of adding a language #16
Comments
There is no real contribution story for grammars and today languages are hardcoded into the extension. A couple of pieces are involved
Ideally, this can happen from the outside. The anycode extension could define a contribution point to which other extensions contribute static data (wasm, metainfo, queries) which is then processed. That would make the contribution story the simplest and easier to maintain |
I did not know that an extra custom parser had to be written (thought tree-sitter was a generic parser fed with textmate grammars). I do not have the requirement to run in the browser and already have a parser written in the language itself (compiles to standard .NET libraries). Would it be more practical for me to attempt writing a Language Server instead? If so, are there any "shell" language servers for .NET where I could implement a set of interfaces only? |
Yes - if you already have a custom parser and language service you should write a language server instead. You can find various SDKs that help with LSP here https://microsoft.github.io/language-server-protocol/implementors/sdks/ |
Thank you. I found https://github.com/OmniSharp/csharp-language-server-protocol . I have a parser but not a language service. The compiler is split into libraries with the lexer and parser having public facades for direct consumption. Is Omnisharp written using https://github.com/OmniSharp/csharp-language-server-protocol ? If yes, it would be the best ever example. |
My involvement in OmniSharp is too long ago to know this. Tho, given it is in their org I'd say it's likely used |
Closing this issue which was more of a question. However, we do plan to make contributing tree-sitter based goodness simpler: #24 |
What are the necessary steps to add a new language (given that a grammer already exists for code) to anycode. I do not require to add it to the repo, but just have it work on my machine.
The text was updated successfully, but these errors were encountered: