-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Support generating LSIF and/or SCIP index. #4119
Comments
Hi, thank you for your feature request! This looks like a nice thing to have! |
Interesting. It seems to me that it should be possible to produce SCIP (which does seem better than LSIF, I never liked LSIF) from HIE files. That could be an independent library from HLS, which HLS could then use to simplify some of its internals. I think many cases where we use HIE files directly could instead use SCIP information, although I don't know if that buys us anything. In some cases we could move functionality over, e.g. our new semantic tokens plugin could I think just be part of the SCIP indexer, since it contains very similar information. (cc @soulomoon ) I think this would be a nice standalone project. Probably too late to sneak it into GSOC? (There's even already a Haskell binding for SCIP!) |
sounds interesting, I'll take a look. Yes we can generate SCIP from HIE files. HLS use lookupKind to find this information. If we solely base the generation on HIE files, I am not sure how much does it take us to generate hie files for all its dependencies(It need the hie file where the symbol is defined to get its Kind). And we might need to find a way to generate hie file for the An alternative would be to add the To prove the concept, we can make some changes like this to HieAst in ghc https://github.com/soulomoon/ghc/pull/1/files, then we can use just HieFile to create SCIP or semantic tokens
|
Is your enhancement request related to a problem? Please describe.
Server Index Format (LSIF) and its successor SCIP Code Intelligence Protocol (SCIP) is a language-agnostic index format like ctags. It's developed by and used in sourcegraph, which provides web interfaces for code browsing with code navigation. Though there is already an LSIF implementation for Haskell, it has not maintained for long time.
Describe the solution you'd like
Adding a feature to generate SCIP index to this.
Also, we can get LSIF index with the SCIP to LSIF converter
Describe alternatives you've considered
Implement as a separated project.
Additional context
I know that rust-analyzer had this functionality, but I can't find any document...
Discussion at clangd
The text was updated successfully, but these errors were encountered: