Skip to content

x/tools/gopls: find all References doesn't work if function name highlighted #76872

@perkerk

Description

@perkerk

Type: Bug

Using Find All References (FAR) does not work when a function name is highlighted. If the name is not highlighted, it does work. It also works if the function name along with the function parentheses are included. Using FAR from the mouse context menu and the Command Palette both do this.

It's extremely confusing that having the name highlighted would cause it not to work, and even more problematic to have to debug this behavior when it's not working

This can be reproduced with the simplest of functions, see the working and not working screenshots included

Image Image

Extension version: 0.50.0
VS Code version: Code 1.107.0 (Universal) (618725e67565b290ba4da6fe2d29f8fa1d4e3622, 2025-12-10T07:43:47.883Z)
OS version: Darwin arm64 25.2.0
Modes:

System Info
Item Value
CPUs Apple M4 Pro (14 x 2400)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: enabled_on
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 2, 2, 2
Memory (System) 48.00GB (5.12GB free)
Process Argv --crash-reporter-id c9e4b48c-0f54-4f1a-934d-d31e7113c6b1
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
pythonvspyt551cf:31249601
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31436602
aj953862:31281341
nes-set-on:31340697
6abeh943:31336334
envsdeactivate2:31353495
cloudbuttont:31379625
todos-1:31405332
3efgi100_wstrepl:31403338
trigger-command-fix:31379601
use-responses-api:31390855
defaultusage:31403421
3i15c187:31428712
ec5jj548:31422691
terminalsuggestenabled:31431119
cp_cls_c_966_ss:31435507
c0683394:31419495
478ah919:31426797
a5gib710:31434435
7ig2g208:31434269
anthropic_thinking_t:31432745
h0hdh950:31428394
cp_cls_c_1081:31433293

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReportIssues describing a possible bug in the Go implementation.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions