Skip to content

Conversation

@fwcd
Copy link
Owner

@fwcd fwcd commented Feb 26, 2021

Fixes #10

This is some experimental work on indexing the project's globally available symbols in the background and offering completions for them, regardless of whether they have been imported or not:

image

Todo:

  • Index globally available symbols on a background thread
    • Store visibility in symbol index
  • Offer completions for these symbols (WIP)
    • Filter by visibility (public, package-private, ...)
    • Filter out already imported symbols (this includes implicitly imported ones, e.g. from java.lang, ...)
      • Handle wildcard imports
    • Automatically add the required imports when selected
      • Find a good import position (e.g. by inserting lexicographically)
    • Offer completions for global/non-imported extension methods/properties
  • Add a config option for disabling symbol indexing completely (e.g. for saving memory)
  • Fix existing code completion unit tests (may require awaiting the initial symbol indexing)
  • Index entire project when language server starts up

Additionally, this branch introduces a new Progress abstraction for emitting progress notifications to the client, if supported.

Future ideas, not in the scope of this PR:

@fwcd fwcd added enhancement New feature or request code completion Auto completion labels Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code completion Auto completion enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-import of global symbols

1 participant