microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.96k stars 28.77k forks source link

trigger suggest #173806

Closed mohamedhashemx closed 1 year ago

mohamedhashemx commented 1 year ago

Type: Bug

trigger suggest not working

VS Code version: Code 1.75.0 (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:23:45.584Z) OS version: Windows_NT x64 10.0.22621 Modes: Unsupported Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 x 2304)| |GPU Status|2d_canvas: enabled
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| |Load (avg)|undefined| |Memory (System)|31.71GB (20.90GB free)| |Process Argv|--crash-reporter-id 20bc9b53-fa17-49c9-9684-dcdebd4c9d7e| |Screen Reader|no| |VM|67%|
Extensions (64) Extension|Author (truncated)|Version ---|---|--- codesnap|adp|1.3.4 vscode-css-formatter|aes|1.0.2 auto-add-brackets|ali|0.12.2 bootstrap5-vscode|Anb|0.4.2 ng-template|Ang|15.1.0 blackbox|Bla|0.10.28 auto-align|bla|0.0.13 bracket-pair-color-dlw|Bra|0.0.6 vscode-tailwindcss|bra|0.9.7 exe-runner|bra|0.2.1 simple-react-snippets|bur|1.2.7 multi-cursor-case-preserve|Car|1.0.5 path-intellisense|chr|2.8.4 vscode-jq|dan|1.2.0 dart-code|Dar|3.58.0 flutter|Dar|3.58.0 vscode-eslint|dba|2.4.0 chatgpt-code|dog|0.1.3 jquerysnippets|don|0.0.1 es7-react-js-snippets|dsz|4.4.3 vscode-html-css|ecm|1.13.1 prettier-vscode|esb|9.10.4 auto-close-tag|for|0.5.14 auto-rename-tag|for|0.1.10 code-runner|for|0.12.0 remotehub|Git|0.50.0 CppSnippets|har|0.0.15 path-autocomplete|ion|1.23.1 fontawesome-autocomplete|Jan|1.3.1 vsc-python-indent|Kev|1.18.0 csharp|ms-|1.25.4 isort|ms-|2022.8.0 python|ms-|2023.2.0 vscode-pylance|ms-|2023.2.10 jupyter|ms-|2023.1.2010391206 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.14 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 azure-repos|ms-|0.26.0 cmake-tools|ms-|1.13.45 cpptools|ms-|1.14.1 cpptools-extension-pack|ms-|1.3.0 powershell|ms-|2023.1.0 remote-repositories|ms-|0.28.0 awesome-flutter-snippets|Nas|4.0.1 material-icon-theme|PKi|4.23.1 vscode-css-peek|pra|4.2.0 LiveServer|rit|5.7.9 vs-code-prettier-eslint|rve|5.0.4 background|sha|1.2.8 indenticator|Sir|0.7.0 js-jsx-snippets|sky|11.0.1 css-auto-prefix|spo|0.1.7 autoimport|ste|1.5.4 vscode-pets|ton|1.21.0 cmake|twx|0.0.17 quokka-vscode|Wal|1.0.525 wordpress-toolbox|wor|1.3.15 php-debug|xde|1.31.0 php-pack|xde|1.0.3 material-theme|zhu|3.15.6 html-css-class-completion|Zig|1.20.0 php-intellisense|zob|1.0.13 (6 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vstes627:30244334 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdf:30486550 c4g48928:30535728 dsvsc012cf:30540253 azure-dev_surveyone:30548225 pyindex848:30577860 nodejswelcome1:30587005 3biah626:30602489 pyind779cf:30657577 f6dab269:30613381 pythonsymbol12cf:30657549 a9j8j154:30646983 ```
gjsjohnmurray commented 1 year ago

Please look at https://github.com/microsoft/vscode/issues/173244 and if this isn't the same as what you're seeing please provide more details here.

blakek commented 1 year ago

Noting I was seeing #173244 before the last update and am now seeing this (assuming this is what OP was mentioning) after the update.

The keyboard shortcut no longer works. Selecting Trigger Suggest from the Command Palette works as expected.

Version: 1.75.1
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf

I'm running the same version on another laptop without issues. I'll comment back if I find anything useful.

blakek commented 1 year ago

Also noting that the problem persists after running Developer: Reload With Extensions Disabled.

I still have this keybinding (what I assume is the default):

{
  "key": "ctrl+space",
  "command": "editor.action.triggerSuggest",
  "when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly && !suggestWidgetVisible"
}
jrieken commented 1 year ago

Please select: F1 > Toggle Keyboards Shortcuts Troubleshooting. I will open a log view showing what command is invoked when pressing a keyboard shortcut. Please share its output here

VSCodeTriageBot commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

blakek commented 1 year ago

This has come up again. I'm still on the latest public version of VS Code.

When pressing ctrl+space, I see this output; there's no "Space" logged:

2023-03-01 08:19:31.147 [error] ENOENT: no such file or directory, open 'rendererLog': Error: ENOENT: no such file or directory, open 'rendererLog'
2023-03-01 08:19:32.225 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2023-03-01 08:19:32.226 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2023-03-01 08:19:32.226 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2023-03-01 08:19:32.649 [info] [KeybindingService]: + Storing single modifier for possible chord ctrl.
2023-03-01 08:19:32.950 [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.

Interestingly, pressing ctrl+shift+space logs as expected:

2023-03-01 08:19:53.331 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2023-03-01 08:19:53.332 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2023-03-01 08:19:53.332 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2023-03-01 08:19:53.514 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl,shift], code: ShiftLeft, keyCode: 16, key: Shift
2023-03-01 08:19:53.515 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl,shift], code: ShiftLeft, keyCode: 4 ('Shift')
2023-03-01 08:19:53.515 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2023-03-01 08:19:53.814 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl,shift], code: Space, keyCode: 32, key:  
2023-03-01 08:19:53.814 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl,shift], code: Space, keyCode: 10 ('Space')
2023-03-01 08:19:53.815 [info] [KeybindingService]: | Resolving ctrl+shift+[Space]
2023-03-01 08:19:53.815 [info] [KeybindingService]: \ No keybinding entries.
2023-03-01 08:19:54.202 [info] [KeybindingService]: + Ignoring single modifier ctrl due to it being pressed together with other keys.
blakek commented 1 year ago

Edit: 🙈 This was user error. I did experience #173244 and assumed this was related. Thanks for suggesting Toggle Keyboards Shortcuts Troubleshooting which pointed me to something!

If anyone else experiences this: I had enabled another input source (with really unfortunate timing). macOS starts hijacking ctrl-space and ctrl-option-space. That can be removed in system settings (Settings » Keyboard » Keyboard Shortcuts… » Input Sources):

You have to remove the shortcut and log out (killing Finder may also work but didn't try).