x/tools/gopls: CLI column offset broken #52069
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
gopls version
latest as of today
What did you do?
I am using the command line interface (I hope to replace my workflow's use of
godef
andgocode
eventually withgopls
).I have some code that looks like this
and I wish to get the
definition
at the line/column position atFoo
. Ignoring the row offset, I would use a column offset of 26, 27 or 28.What did you expect to see?
Same as
godef
, the object definition forFoo
What did you see instead?
gopls definition
picks up theint64
, returningIf I use a column value 6 characters less than it should be (could be coincidence but that's the length of the identifier
counts
that my line starts with, or both themap
identifiers) of 20, 21 or 22 then I see what I want.Somewhat related:
gopls implementation
,references
andhighlight
all seem to be affected by the same problem.The text was updated successfully, but these errors were encountered: