-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: More hovering information on the LSP (#3282)
Fixes #3281 Fixes dafny-lang/ide-vscode#335 Fixes dafny-lang/ide-vscode#317 Fixes dafny-lang/ide-vscode#210 Example code: ```dafny predicate P(i: int) { i <= 0 } predicate Q(i: int, j: int) { i == j || -i == j } function method Toast(i: int): int requires P(i) method Test(i: int) returns (j: nat) ensures Q(i, j) { if i < 0 { return -i; } else { return Toast(i); } } ``` | Before: | After | | --------|-------| | Hovering Q(i,j) ![image](https://user-images.githubusercontent.com/3601079/209727765-e3c9c32b-dd27-4707-893b-8534b9ec0698.png) | ![image](https://user-images.githubusercontent.com/3601079/209727590-2f833693-4b9d-44cf-afa8-fe43388e0c3d.png) | | Hovering the second return ![image](https://user-images.githubusercontent.com/3601079/209727748-5d291a36-7334-4b9c-8c08-c68718fd50f9.png) | ![image](https://user-images.githubusercontent.com/3601079/209727565-19b8a1c6-0f78-41a3-ad85-7e0cbc1538c8.png) | | Hovering the call to Toast() ![image](https://user-images.githubusercontent.com/3601079/209727700-2e66f345-dd1f-47c5-92ce-cea811d2b8ce.png) | ![image](https://user-images.githubusercontent.com/3601079/209727556-cbfe43c5-9fe2-49c9-a107-7111ef42b00c.png) | | Also, on the diagnostics side (and it's clickable!) ![image](https://user-images.githubusercontent.com/3601079/209844964-be5a31df-dddd-421a-937f-39a26fa8ce76.png) | ![image](https://user-images.githubusercontent.com/3601079/209845060-09dd8fb5-5cd8-4e92-8302-beb93a837412.png) | | The resolver error appears after all obsolete verification error<br>![image](https://user-images.githubusercontent.com/3601079/209727781-b3d88e9b-8bad-4e3b-b8fc-e9119837629e.png) | ![image](https://user-images.githubusercontent.com/3601079/209728682-206bf18a-dfd8-40c5-a10d-8b5a4ccdd4c1.png) | I added language server tests and tested it in VSCode, and it works as expected. <!-- Are you moving a large amount of code? Read CONTRIBUTING.md to learn how to do that while maintaining git history --> <small>By submitting this pull request, I confirm that my contribution is made under the terms of the [MIT license](https://github.com/dafny-lang/dafny/blob/master/LICENSE.txt).</small>
- Loading branch information
1 parent
d0057aa
commit 7e019ba
Showing
15 changed files
with
321 additions
and
27 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
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.