-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: pkg completion without dot (#705)
* bugfix: pkg completion without dot. Sometimes lsp handle completion request before didChange notification and without trigger character dot in vfs. fix pkg completion in this case * fix kcl lint err
- Loading branch information
Showing
8 changed files
with
234 additions
and
20 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
30 changes: 30 additions & 0 deletions
30
kclvm/tools/src/LSP/src/test_data/completion_test/without_dot/completion.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,30 @@ | ||
import .pkg # complete import path | ||
import .pkg.subpkg | ||
schema Person: | ||
name: str | ||
age: int | ||
|
||
p = Person { | ||
name: "alice" | ||
age: 1 | ||
} | ||
|
||
p1 = p # complete schema attr | ||
|
||
p2 = p.name # complete builtin (str) function | ||
|
||
p3 = subpkg # complete user module definition | ||
|
||
import math | ||
math # complete system module definition | ||
|
||
"a" | ||
|
||
p4 = Person{ | ||
|
||
} | ||
|
||
schema P: | ||
a: int = 1 | ||
|
||
aaaa = P{} |
Empty file.
Empty file.
3 changes: 3 additions & 0 deletions
3
kclvm/tools/src/LSP/src/test_data/completion_test/without_dot/pkg/subpkg/file1.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 @@ | ||
schema Person1: | ||
name: str | ||
age: int |