vscode icon indicating copy to clipboard operation
vscode copied to clipboard

workspace/symbol only sends the part of the query before the first space the the provider

Open BazookaMusic opened this issue 9 months ago • 5 comments

Type: Bug

  1. Create a simple extension which exposes the workspace/symbol endpoint
  2. Ctrl+T in VSCode, write "#my query string"

Expected: Extension receives a request where: { "query": "my query string" }

Actual: Extension receives a request where: { "query": "my" }

The rest of the query is thrown away.

At the same time though, the picker does not ignore the spaces, so it will match symbols called "my query string" exactly and prioritize them in the search. However, this way the language server extension cannot do its own filtering since it loses most of the information. The filtering can also be wrong since the intent of the user here is definitely not to search for "my".

VS Code version: Code 1.98.2 (ddc367ed5c8936efe395cffeec279b04ffd7db78, 2025-03-12T13:32:45.399Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-13700HX (24 x 2304)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 61.70GB (30.92GB free)
Process Argv --crash-reporter-id 7f514632-f3ba-4077-a713-d61075a9f88f
Screen Reader no
VM 0%
Extensions (14)
Extension Author (truncated) Version
vscode-sql-formatter adp 1.4.4
vulnerability-extension dev 1.2025.205001
copilot Git 1.293.1471
copilot-chat Git 0.26.2025030506
azure-pipelines ms- 1.228.0
vscode-azureresourcegroups ms- 0.9.4
vscode-dotnet-runtime ms- 2.0.8
al ms- 16.0.0
sarif-viewer MS- 3.4.4
azure-account ms- 0.12.0
powershell ms- 2024.2.2
vscode-speech ms- 0.12.1
vscode-xml red 0.27.1
kuskus-kusto-language-server ros 3.3.1
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
iacca1:31171482
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
9064b325:31222308
copilot_t_ci:31222730
f27dg485:31264363
e5gg6876:31271075
jda6j935:31233686
pythoneinst12:31262605
bgtreat:31268568
fh1c7952:31258891
31787653:31262186
793h1473:31266633
49da9784:31264548

BazookaMusic avatar Mar 28 '25 13:03 BazookaMusic

Tested this with a provider based on VS Code API and it is already a problem there.

dbaeumer avatar Mar 31 '25 08:03 dbaeumer

All quick picker split a query by spaces to allow to narrow down a search by multiple segments.

This may not be the best choice for symbols if they contain spaces (which is probably not very common).

//cc @TylerLeonhardt

bpasero avatar Mar 31 '25 09:03 bpasero

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!