Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Documentation for adding a new language needs update #587

Open
Wikunia opened this issue Mar 22, 2021 · 3 comments
Open

Documentation for adding a new language needs update #587

Wikunia opened this issue Mar 22, 2021 · 3 comments

Comments

@Wikunia
Copy link

Wikunia commented Mar 22, 2021

I'm interested in adding JuliaLang to sourcegraph but unfortunately the readme seems to be quite out of date:

(optional, to enable jump to definition) Ensure the language is present in the command line arguments to universal-ctags > https://github.com/sourcegraph/sourcegraph/blob/21efc6844838e773b9a8f4a7ba1d5628e8076984/cmd/symbols/internal/pkg/ctags> /parser.go#L71
-> This link doesn't exist for main

Make sure there is a mapping entry for the languageID in
https://github.com/sourcegraph/sourcegraph/blob/master/shared/src/languages.ts#L40
The url fails as the language.ts file doesn't seem to exist there

I tried adding a juliaSpec but it seems to need some more like telling sourcegraph about a new language. Changing a different spec works for me. Any suggestions?

@malomarrec
Copy link

@tjkandala I think you fixed this in #592? Can we close this?

@Wikunia
Copy link
Author

Wikunia commented Mar 26, 2021

Thanks for the update. It's still a bit unclear whether I need to run the generate and publish scripts. Julia is present in the language.ts file so it looks like it should work after adding the comment spec for it.
It doesn't though and it's a bit unclear why. I tried it out with different comment specs and changed my Julia file after checking the actual Julia comment spec.

For either of them it shows an empty hover for a few milliseconds and then disappears. Without giving feedback in the console. Is there a command line way of testing and debugging?

@efritz
Copy link
Contributor

efritz commented Mar 29, 2021

It looks like this section could use a bit of an update: https://docs.sourcegraph.com/dev/how-to/add_support_for_a_language#syntax-highlighting-support

Could we add some deeper explanation or any missing steps here? cc @sourcegraph/frontend-platform and @slimsag

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants