Hacker News new | past | comments | ask | show | jobs | submit login

Is it easy to add new languages? I work at a large company with some very old codebases.



@chrismwendt is a Sourcegrapher working on this. Posting this on his behalf:

Here is how I added GraphQL support last week:

- Follow the hello world tutorial https://github.com/sourcegraph/sourcegraph-extension-docs/bl...

- Add logic to handle hovers and definitions https://github.com/sourcegraph/sourcegraph-graphql

- Write the server part https://github.com/chrismwendt/graphql-ws-langserver (once a browser-based GraphQL analysis library exists, this would be unnecessary because the analysis could be done entirely in the browser)

It's available at https://sourcegraph.com/extensions/chris/graphql and once you enable it you can test it out on a GraphQL file such as https://sourcegraph.com/github.com/chrismwendt/graphql-ws-la... (it's pretty slow/janky at the moment and could be improved, but works).

If you're interested in interfacing with other tools too, you might be interested in LSP (Language Server Protocol):

- https://langserver.org/

- https://microsoft.github.io/language-server-protocol/specifi...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: