-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: lsp hover for dict into schema expr key (#1343)
* feat: lsp hover for dict into schema expr key Signed-off-by: he1pa <[email protected]> * chore: move insta to dev-dependencies Signed-off-by: he1pa <[email protected]> --------- Signed-off-by: he1pa <[email protected]>
- Loading branch information
Showing
8 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
5 changes: 5 additions & 0 deletions
5
.../tools/src/LSP/src/snapshots/kcl_language_server__hover__tests__dict_key_in_schema-2.snap
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: tools/src/LSP/src/hover.rs | ||
expression: "format!(\"{:?}\", got)" | ||
--- | ||
Hover { contents: Scalar(String("name: int")), range: None } |
5 changes: 5 additions & 0 deletions
5
.../tools/src/LSP/src/snapshots/kcl_language_server__hover__tests__dict_key_in_schema-3.snap
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: tools/src/LSP/src/hover.rs | ||
expression: "format!(\"{:?}\", got)" | ||
--- | ||
Hover { contents: Scalar(String("name: int")), range: None } |
5 changes: 5 additions & 0 deletions
5
kclvm/tools/src/LSP/src/snapshots/kcl_language_server__hover__tests__dict_key_in_schema.snap
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
source: tools/src/LSP/src/hover.rs | ||
expression: "format!(\"{:?}\", got)" | ||
--- | ||
Hover { contents: Scalar(String("name: int")), range: None } |
14 changes: 14 additions & 0 deletions
14
kclvm/tools/src/LSP/src/test_data/hover_test/dict_key_in_schema/dict_key_in_schema.k
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
schema Name: | ||
name: int | ||
|
||
n1: Name = { | ||
name = 1 | ||
} | ||
|
||
n2 = Name{ | ||
name: 1 | ||
} | ||
|
||
n3: Name = Name{ | ||
name: 1 | ||
} |