-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: lsp completion depend on func return type for func call expr (#1472
) Signed-off-by: he1pa <[email protected]>
- Loading branch information
1 parent
69bf678
commit 2123149
Showing
8 changed files
with
64 additions
and
1 deletion.
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
5 changes: 5 additions & 0 deletions
5
...tools/src/LSP/src/snapshots/kcl_language_server__completion__tests__func_return_ty_1.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/completion.rs | ||
expression: "format!(\"{:?}\", got_labels)" | ||
--- | ||
["capitalize(…)", "count(…)", "endswith(…)", "find(…)", "format(…)", "index(…)", "isalnum(…)", "isalpha(…)", "isdigit(…)", "islower(…)", "isspace(…)", "istitle(…)", "isupper(…)", "join(…)", "lower(…)", "lstrip(…)", "removeprefix(…)", "removesuffix(…)", "replace(…)", "rfind(…)", "rindex(…)", "rsplit(…)", "rstrip(…)", "split(…)", "splitlines(…)", "startswith(…)", "strip(…)", "title(…)", "upper(…)"] |
5 changes: 5 additions & 0 deletions
5
...tools/src/LSP/src/snapshots/kcl_language_server__completion__tests__func_return_ty_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/completion.rs | ||
expression: "format!(\"{:?}\", got_labels)" | ||
--- | ||
["name"] |
5 changes: 5 additions & 0 deletions
5
...tools/src/LSP/src/snapshots/kcl_language_server__completion__tests__func_return_ty_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/completion.rs | ||
expression: "format!(\"{:?}\", got_labels)" | ||
--- | ||
[] |
4 changes: 4 additions & 0 deletions
4
...tools/src/LSP/src/test_data/completion_test/dot/func_return/func_return_1/func_return_1.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,4 @@ | ||
f: () -> str = lambda { | ||
"" | ||
} | ||
a = f() |
8 changes: 8 additions & 0 deletions
8
...tools/src/LSP/src/test_data/completion_test/dot/func_return/func_return_2/func_return_2.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,8 @@ | ||
schema Name: | ||
name: str | ||
|
||
f1: (str) -> Name = lambda s: str -> Name { | ||
Name {name: s} | ||
} | ||
|
||
b = f1("a") |
3 changes: 3 additions & 0 deletions
3
...tools/src/LSP/src/test_data/completion_test/dot/func_return/func_return_3/func_return_3.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,3 @@ | ||
f: () -> str = lambda { | ||
"" | ||
} |