Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Indexer to collect symbols for 'find symbol' #433

Closed
MikhailArkhipov opened this issue Nov 26, 2018 · 0 comments
Closed

Indexer to collect symbols for 'find symbol' #433

MikhailArkhipov opened this issue Nov 26, 2018 · 0 comments

Comments

@MikhailArkhipov
Copy link

No description provided.

@MikhailArkhipov MikhailArkhipov added this to the Dec 2018.2 milestone Dec 5, 2018
@karthiknadig karthiknadig modified the milestones: Dec 2018.3, Jan 2019.1 Jan 9, 2019
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>`).
@MikhailArkhipov MikhailArkhipov changed the title Indexer to collect symbols for 'goto definition' and 'find symbol' Indexer to collect symbols for 'find symbol' Feb 4, 2019
@gramster gramster modified the milestones: Jan 2019.2, Feb 2019.1 Feb 6, 2019
@jakebailey jakebailey assigned brianbok and unassigned jakebailey Feb 20, 2019
@jakebailey jakebailey modified the milestones: Feb 2019.1, Feb 2019.2 Feb 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants