-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tools/spxls): implement textDocument/completion
#1169
Conversation
Skipping CI for Draft Pull Request. |
16dd42d
to
6c7f3bd
Compare
6c7f3bd
to
7d97b8f
Compare
7d97b8f
to
55206a6
Compare
diagnostics := result.diagnostics[param.TextDocument.URI] | ||
if len(diagnostics) > 0 { | ||
return nil, fmt.Errorf("failed to compile file: %s", diagnostics[0].Message) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
当时在 https://github.com/goplus/builder/pull/1162/files#diff-0c6691e1482b8fb7fab79c84814456d80895bd823bc74fee320c1dc82c70ea9f 添加这个处理,是因为有语法错误时 astFile
为 nil
对吧?
这个 pr 调整了 compile 的逻辑,现在有语法错误时也能正常拿到 astFile
了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
添加这个处理,是因为有语法错误时
astFile
为nil
对吧?
是的
这个 pr 调整了 compile 的逻辑,现在有语法错误时也能正常拿到
astFile
了。
棒 👍
Copilot
AI
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 11 changed files in this pull request and generated 2 comments.
Files not reviewed (5)
- tools/spxls/README.md: Evaluated as low risk
- tools/spxls/internal/server/command.go: Evaluated as low risk
- tools/spxls/internal/server/command_test.go: Evaluated as low risk
- tools/spxls/internal/server/compile.go: Evaluated as low risk
- tools/spxls/internal/server/completion_test.go: Evaluated as low risk
Comments suppressed due to low confidence (3)
tools/spxls/internal/server/util.go:148
- The function name
expandGopOverloadedMethod
is now consistent with the naming convention used elsewhere in the codebase.
func expandGopOverloadedMethod(method *types.Func) []*types.Func {
tools/spxls/internal/server/util.go:3
- The bitwise OR operation to convert the first character to lowercase might not work correctly for non-ASCII characters. Consider using a more robust method for handling Unicode characters.
return string(s[0]|32) + s[1:]
tools/spxls/internal/server/server.go:83
- Ensure that the
CompletionItem
struct is properly initialized and used within thetextDocumentCompletion
function.
return s.textDocumentCompletion(¶ms)
55206a6
to
c8b5bc7
Compare
Copilot
AI
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 11 changed files in this pull request and generated 1 comment.
Files not reviewed (5)
- tools/spxls/README.md: Evaluated as low risk
- tools/spxls/internal/server/command.go: Evaluated as low risk
- tools/spxls/internal/server/server.go: Evaluated as low risk
- tools/spxls/internal/server/util.go: Evaluated as low risk
- tools/spxls/internal/server/compile.go: Evaluated as low risk
Updates goplus#1059 Signed-off-by: Aofei Sheng <[email protected]>
c8b5bc7
to
542f407
Compare
This PR has been deployed to the preview environment. You can explore it using the preview URL. Warning Please note that deployments in the preview environment are temporary and will be automatically cleaned up after a certain period. Make sure to explore it before it is removed. For any questions, contact the Go+ Builder team. |
Updates #1059