-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[move-ide] Improvements to enum and curly brace auto-completion (#20106)
## Description This PR fixes addresses some problems with auto-completion: 1. Previously, auto-completion for enum types/variants did not work inside of match expression. We needed to add both some parsing resilience to match arm parsing and update the cursor to be able to find match patterns in the AST. Now we have: ![image](https://github.com/user-attachments/assets/76426e84-59e6-4855-9f20-2ea3135e0483) 2. A smaller update addresses a minor problem with auto-completion after `{`. Previously, if no intelligent match was found, we were still returning "default" matches which had an annoying effect of accidentally auto-completing an essentially random string after any `{` (e.g., the on starting a function body block). ## Test plan All old (updated) and new tests must pass.
- Loading branch information
Showing
9 changed files
with
149 additions
and
33 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,6 +153,10 @@ | |
{ | ||
"use_line": 82, | ||
"use_col": 18 | ||
}, | ||
{ | ||
"use_line": 87, | ||
"use_col": 22 | ||
} | ||
], | ||
"uses.move": [ | ||
|
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
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