-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: LSP autocompletion for
TypePath
(#6117)
# Description ## Problem Autocompletion for `TypePath` didn't exist because it's a recently added feature. ## Summary Offers suggestions when you type, for example, `u32::`. For this I had to allow parsing a `TypePath` without any ident following it (like we do for paths), still producing a parsing error. ![lsp-complete-type-path](https://github.com/user-attachments/assets/8126f181-aad1-4e57-b94b-53b7b668e083) Also fixes the issue that built-in types weren't suggest in any position (only where types are expected, like function argument types, but now that you can call static methods on these types it makes sense to always offer them): ![lsp-suggest-type](https://github.com/user-attachments/assets/76748dcb-20ea-485c-92cf-aab6487d6ab4) ## Additional Context ## Documentation Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
- Loading branch information
Showing
3 changed files
with
106 additions
and
18 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
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