code-intel-extensions icon indicating copy to clipboard operation
code-intel-extensions copied to clipboard

Documentation for adding a new language needs update

Open Wikunia opened this issue 4 years ago • 3 comments

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?

Wikunia avatar Mar 22 '21 22:03 Wikunia

@tjkandala I think you fixed this in https://github.com/sourcegraph/code-intel-extensions/pull/592? Can we close this?

malomarrec avatar Mar 26 '21 08:03 malomarrec

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?

Wikunia avatar Mar 26 '21 09:03 Wikunia

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

efritz avatar Mar 29 '21 17:03 efritz