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
x/tools/gopls: find definition should return filename part as it is under Windows #47481
Comments
Maybe this should be resolved in eglot? (directory-file-name "C:/Go/src/math/abs.go") ;; c:/Go/src/math/abs.go cc @joaotavora |
Hi, could you please share your full LSP logs for a session that produces this bug (see instructions here)? That will help pinpoint where the incorrect casing is coming from. Thanks. |
@wsw0108 mentioning Eglot specific details to the authors of a language server is unlikely to be productive. You should post the requested details, nevertheless. If you want to open an issue in the Eglot tracker, you can, provided you follow the template there. If you don't have those details, you can also start a conversation in Eglot's discussion forum. @findleyr from what I could gather of this description the problem had nothing to do with gopls |
@findleyr log attached.
|
reproduce repo https://github.com/wsw0108/CASE-eglot. cd CASE-eglot
emacs -Q -l init.el test.go |
Thanks for the logs, as they made it apparent that it is indeed gopls that is producing the upper-cased drive name. Investigating, gopls actually always uses upper-case drive names in its URIs: see #36904. Because windows drive names are not case sensitive, gopls does this to normalize paths returned from different sources. Unless I'm missing something, it seems like this must be handled client-side, i.e. in emacs. I'm closing because I don't think there's anything we can reasonably do here, but please re-open if there's more to discuss. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?Windows 10, x64
go env
OutputWhat did you do?
Using gopls with eglot(
(setq eglot-extend-to-xref t)
).xref-find-definitions
undermath.Abs(...)
.What did you expect to see?
No new gopls server starts for the 'xrefed' go standard library file.
What did you see instead?
A new gopls server starts for the 'xrefed' go standard library file.
EGLOT event buffer:
buffer-file-name for opened buffer
c:/Go/src/math/abs.go
.https://github.com/joaotavora/eglot/blob/194b178ef41ccd3d937983f3829d44a546bb24d6/eglot.el#L1598-L1601
The text was updated successfully, but these errors were encountered: