-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
completion on breakpoint remove all items #160373
Comments
I saw it working on microsoft/vscode-languageserver-node#1072 |
Sorry @dbaeumer I don't really know how this works, this editor just calls |
@roblourens in LSP completions work the same way as normal API. So I am wondering how breakpoint completion works in a scenario where the completion provider is registered on the VS Code API directly (without any LSP). Do we have an example? Then I could explain what needs to be done in an LSP world. |
I don't think there's a difference between the two, for this code. @isidorn do you happen to know what might be missing here? |
@roblourens no, sorry. I think that the trick we are doing here is to "pretend" like the user is typing in the editor below, and not in the |
I think that with this approach, we basically get variables that are in the scope of the main editor, then they are filtered by the text in the breakpoint widget editor. But the text in the breakpoint widget editor is never taken into account when getting completions. If I type I think we would need something like a fake textmodel which has the code in the breakpoint widget editor inserted into that spot in the editor model, so that completions are requested with full context. I'm not really sure that's practical. |
I confirm this is how it always worked. And I believe your interpretation is spot on. |
@dbaeumer does LSP itself offer anything for this scenario? The scenario basically being, give me completions for this position in this document, BUT with this extra code context (the code I am typing in the breakpoint widget). It would be nice for this to work fully but I would have to consult with another expert since the other options I can think of seem like bad hacks
|
@roblourens LSP has no support for this scenario. IMO if we want to provide this we need some API in VS Code as well. |
Related: #48810 |
Type: Bug/Feature request
when create an expression for a breakpoint looks like it does not handle correctly the world split.
I can explain it only by images, on my code If I try to complete a word it gives a lot of result:
But if the same word is after a logical operator the result are much less:
VS Code version: Code 1.71.0 (784b017, 2022-09-01T07:36:10.600Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No
System Info
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Extensions (23)
(2 theme extensions excluded)
A/B Experiments
The text was updated successfully, but these errors were encountered: