Skip to content
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: cannot go to definition when "ui.navigation.importShortcut": "Link" #45987

zyctree opened this issue May 6, 2021 · 1 comment


Copy link

@zyctree zyctree commented May 6, 2021

What did you do?

add the following in vscode setting

    "gopls": {
        "ui.navigation.importShortcut": "Link"

What did you expect to see?

"go to definition" doesn't work:in vscode, right-click on any function, or type, or variable, then click "go to definition" shows 'no definition found for XXX'.

logs shows

[Trace - 14:02:56.949 PM] Received response 'textDocument/definition - (103)' in 0ms.
Result: null

What did you see instead?

"go to definition" should work

it works when

    "gopls": {
        "ui.navigation.importShortcut": "Both"

Build info v0.6.11 h1:WC/eGK7AcuoBLCv3JzzQrRIaaeRTSRgVjwtbDlN18BI= h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= h1:F5Gozwx4I1xtr/sr/8CFbb57iKi3297KFs0QDbGN60A= h1:rTLms91GhM16y4sUcNGLdel0jJ8jXdQeXuN+7evgYiQ= h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= h1:qTakTkI6ni6LFD5sBwwsdSO+AQqbSIxOauHTTQKZ/7o= h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA= h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
Copy link

@gopherbot gopherbot commented May 10, 2021

Change mentions this issue: internal/lsp: fix no definition when importShortcut is link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants