This repository was archived by the owner on Apr 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 133
Indexer to collect symbols for 'find symbol' #433
Comments
This was referenced Dec 12, 2018
Merged
jakebailey
added a commit
that referenced
this issue
Jan 16, 2019
For #433. Closes #483. Closes #484. Closes #485. General overview: - Indexing happens on each parse, so with the current LS, every file in the workspace gets indexed. This will need to be reworked. - All symbol queries go to the index, I have not yet approached #486. - I do some extra heuristics to highlight some of the more interesting symbols, namely: - `__init__` in a `class` will be marked as a constructor. - Functions annotated with a property decorator are given the kind `Property`. - Functions that fit the pattern `__.*__` are given the kind `Operator`. - Other functions in a class are given the kind `Method`. - Variables that look like `UPPERCASE_UNDERSCORE_123` at the top level or directly inside a class are given the kind `Constant`. - Any parse updates the index. I don't do any version management other than to look up the AST on the parse complete event. - VS-specific "functionKind" is preserved. Things to do in future PRs: - Fallback to analysis when it's present. I left all of the functions previously used there. - Using the import system to answer the question "is this thing being imported a module or not", probably augmented/modified outside the indexer. - Parse version management. - Asynchronous behavior (switching the dictionary to be a map from `Uri` to `TaskCompletionSource<HierarchicalSymbol>`).
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
No description provided.
The text was updated successfully, but these errors were encountered: