I I try to write code more faster, but I have a trouble. I use Astro.js with TypeScript and VSCode with Astro extension.
When I write some prop (attribute) in my component tag I get intellisense dropdown with available props this component.
After accept iconDirection
I get iconDirection=""
with 2 cursor places (I think it some snippet logic).
It decision don't show a next intellisense suggest.
After that I exite from "snippet itinerary", remove quote symbols and write them again. And only this way I get a second intellisense with available values current prop.
What I'm waiting in second hint
General question: How I can write it more faster?, i.e.:
i
Or:
I've tried setting the quotes in VSCode to not automatically put them, but it doesn't affect the intellisense tooltips being expanded. They are still expanded along with the ="". I tried to call tooltips through key combinations, but they are called a little incorrectly (a full set of tooltips, instead of several values). I tried (and am still trying) to find a solution for editing tooltips into the form I need.
UPD: I partially solve the problem by adding this settings:
"editor.snippetSuggestions": "bottom",
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": true
},
But this forces me to use shortcuts and does not show tooltips automatically =(
As far as I know, VS Code doesn't support this normally (automatically triggering suggestions after accepting another suggestion or inserting a snippet without the user typing anything to trigger quick suggestions). Maintainers seem to agree. See this exchange (quoting Johannes Rieken):
Is your expectation that VS Code asks for completions right after accepting one completion item?
VS Code doesn't do that... Auto triggering suggestion only happens on typing (word starts or trigger characters). However, you can use
editor.action.triggerSuggest
as command on a suggestion to "manually" retrigger suggest after inserting one.
In that second paragraph, I believe he's referring to CompletionItem
's command
property- I.e. that solution would have to be hard-coded, which has to be done on a per extension / CompletionItemProvider
/ CompletionItem
basis.
I suppose if you really wanted a feature like that, you could raise a feature-request issue ticket.
But I'd personally just suggest binding triggering autocomplete to something really easy to reach. I personally use alt+a (thumb + pinky, though I rebind my caps-lock to ctrl, so it would be just as easy with the default ctrl/cmd+space).