TypeScript and intellisense often randomly opens with "if" snippet selected ignoring any properties
See original GitHub issueIssue Type: Bug
Declare an interface with some properties. Create a function with parameter type of that interface.
Call function with object declared inside function call. Press CTRL + SPACE and note how usually the intellisense prompt will open approximately half way through the options with the “if” snippet selected. The user then has to manually scroll to the top of the list in order to see the properties expected.
interface Something {
propertyOne: any,
propertyTwo: any,
};
const someFunction = (something: Something) => {};
someFunction({ <focus here and press CTRL + SPACE> });
The user then has to scroll to the top:
I suggest that the intellisense menu scrolls to the very top always (why is it currently in the middle, for example). TypeScript has already inferred what properties are available, so it should be a case of fixing the default selected item in the intellisense menu.
VS Code version: Code 1.36.1 (2213894ea0415ee8c85c5eea0d0ff81ecc191529, 2019-07-08T22:59:35.033Z) OS version: Windows_NT x64 10.0.18362
System Info
Item | Value |
---|---|
CPUs | Intel® Xeon® CPU E5-1650 v4 @ 3.60GHz (12 x 3592) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software oop_rasterization: unavailable_off protected_video_decode: unavailable_off rasterization: unavailable_off skia_deferred_display_list: disabled_off skia_renderer: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 15.92GB (4.16GB free) |
Process Argv | –folder-uri <redacted> |
Screen Reader | no |
VM | 0% |
Extensions (26)
Extension | Author (truncated) | Version |
---|---|---|
Bookmarks | ale | 10.4.4 |
simple-react-snippets | bur | 1.2.2 |
npm-intellisense | chr | 1.3.0 |
path-intellisense | chr | 1.4.2 |
bracket-pair-colorizer-2 | Coe | 0.0.28 |
prettier-vscode | esb | 1.9.0 |
auto-close-tag | for | 0.5.6 |
auto-rename-tag | for | 0.1.0 |
vscode-react-typescript | inf | 1.3.0 |
vscode-peacock | joh | 2.4.0 |
TypeScriptImport | kev | 1.17.0 |
rainbow-csv | mec | 1.1.1 |
vscode-less | mrm | 0.6.3 |
azure-account | ms- | 0.8.4 |
vscode-typescript-tslint-plugin | ms- | 1.2.2 |
vetur | oct | 0.21.1 |
vue-vscode-extensionpack | sdr | 0.2.0 |
vue-vscode-snippets | sdr | 1.7.1 |
ayu | tea | 0.18.0 |
vscode-status-bar-format-toggle | tom | 1.5.0 |
terminal-tabs | Tyr | 0.2.0 |
highlight-matching-tag | vin | 0.9.2 |
WebTemplateStudio-dev-nightly | WAS | 0.0.1919601 |
vscode-import-cost | wix | 2.12.0 |
vscode-jumpy | wma | 0.3.1 |
JavaScriptSnippets | xab | 1.7.2 |
(1 theme extensions excluded)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7 (2 by maintainers)
Top GitHub Comments
Also agree with @lloydjatkinson,
"first"
ought to be the default. The other default behavior is disorienting. And there’s still a bug here regarding how auto-suggest behaves when whitespace is added.@lloydjatkinson Do you have theeditor.snippetSuggestions
-setting configured?This is because of the
editor.suggestSelection
-setting. The default is to preselect the least recent used item (unless any other item is selected). You can change the value of that setting tofirst
to get out of this, not sure how to make the default better tho…