-
-
Notifications
You must be signed in to change notification settings - Fork 1
draft impl for indexstore-powered improved highlights #245
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
Conversation
so there’s a weird issue in that we seem to be getting symbol occurrence information from IndexStoreDB, but it is somewhat limited, and not particularly “LSP-like”. in particular, we are not seeing resolutions for standard library symbols (e.g. |
after doing some more investigation, it seems we have at least two possibly unrelated issues
the second issue we can probably get around with the right heuristics, but the first one is a major blocker. it seems IndexStoreDB is only including information about symbols in the same module, which for a snippet, is the snippet itself. could we be initializing the
here is an annotated illustration of the problems in the test snippet: |
…RE=1 environment variable
this PR adds most of the logic needed for improved IndexStoreDB syntax highlighting, gated behind the build-time
UNIDOC_ENABLE_INDEXSTORE=1
environment variable.this violates our longstanding ban on the Foundation dependency, but all the alternatives seemed patently stupid. (and it’s not like importing Foundation in the manifest could cause any problems in the first place.)
for unknown reasons, our IndexStoreDB intergration is unable to emit symbol information for symbols outside the current SwiftPM Snippet, which is our principal use case. so the feature will be of very little impact until that issue is resolved. that issue will be tracked in #246