forked from chapel-lang/chapel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Language Server Improvements: find references, basic autocompletion (c…
…hapel-lang#24213) This PR implements a few extra features in the Python-based language server. * It adds `Scope` objects to the Python API. This makes it possible for Python code to inspect scopes (currently, just listing used/imported modules in a scope). * It refactors the binary search code to be stored in a class, so that other things (definitions) can be binary searched via cursor position. * It uses the used/imported modules from the given file to provide autocomplete suggestions for identifiers (currently not intelligent enough to filter based on type / `bla.`). * It builds another segment list for _defined_ symbols, and uses that (and some additional bookkeeping) to find references _within a file_. I'm planning on a refactor to keep track of workspace changes, so that _global_ 'find references' works too. Reviewed by @jabraham17 -- thanks! ## Testing - [x] paratest for the parser changes
- Loading branch information
Showing
10 changed files
with
749 additions
and
445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.