You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
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>`).
This is obsolete; the indexer will always be queried for info regardless of the status of the analysis. I'll open an issue for allowing the analysis to augment the indexed data (better detection of imports, for example).
For #433.
The text was updated successfully, but these errors were encountered: