-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
code-snippets autocomplete is broken #209534
Comments
I am using your steps, but I cannot reproduce this. Do you have any other setting that could influence this? |
Please diagnose the root cause of the issue by running the command Happy Coding! |
vscode/extensions/json-language-features/package.json Lines 130 to 143 in 5410686
PR #235605 |
partial pr #235605 |
@RedCMD Sorry, I can still not produce. Please help by distilling exact reproducible step and do not jump to any conclusions yet |
can confirm insiders.vscode.dev 20241209-1041-57.1286095.mp4thank you for your time |
🤷 Screen.Recording.2024-12-09.at.11.51.22.mov |
@aeschli Do you have a clue? This seems to be JSON-schema based completions related but I can't reproduce |
I have updated the original steps, it's important to start with @aeschli I can see that JSON gives this completion text and no "overwrite after", which then leads to double quotes. Check ![]() |
The problem is that for snippets, the default is 'insert' mode. For JSON it is 'replace' mode. For this example:
with the cursor between the The JSON server produces the correct results, it's just that users don't expect insert mode, they expect replace mode. |
Which is incompatible with VS Code's default. Can't we get alignment here? |
|
IMO using insert as default would mean for JSON to no longer return richer completions such as |
We added replace-ranges quite late to VS Code, how did JSON work the years before that? |
og commits: |
Code completions started with |
But that's only a user default (because it matches what mostlanguages were doing at the time, and still do). It does not mean each language must implement insert and replace for all completions, you could have left everything as before. In JSON, with a complex suggestion like |
Type: Bug
For example:
"test": { }
"
, it gets completed to"|"
(this steps is important)Inserted Autocomplete is an invalid json with
"""
VS Code version: Code 1.87.2 (863d258, 2024-03-08T15:20:17.278Z)
OS version: Windows_NT x64 10.0.22631
Modes:
System Info
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
A/B Experiments
The text was updated successfully, but these errors were encountered: