Merged
Conversation
702525f to
c98f093
Compare
c98f093 to
ec24c82
Compare
Contributor
Author
|
Maybe it would be a good idea update lsp code to match latest gopls code, it implements |
ec24c82 to
cba0d6a
Compare
Owner
|
Thanks a lot! I'll take a proper look when I get chance. URI parsing can result in security issues, so I need to give it some proper time to review. |
a-h
approved these changes
Dec 31, 2025
Owner
|
Thanks, much appreciated. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LSP diagnostics didn't work before because:
strings.TrimPrefixwas used to get file path,strings.TrimPrefix("file:///c:/Users/uwu", "file://")would return/c:/Users/uwuwhich is not valid windows path"file://" + pathmakes invalid URI if the path contains windows path, there should be three/Functions are taken from https://github.com/golang/tools/blob/4df13e317ce43275bec40ab5c9ce3e926fa92655/gopls/internal/protocol/uri.go
Now it works(don't mind the floating explorer tab, it's windows being windows 😬):

I don't have a windows machine so I tested it on docker version of windows, if you have the opportunity to test it yourself, do it!
fixes #1121