You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just like you can hook events to regular Javascript objects such as onclick event to button, I would like to be able to execute custom code when certain events are happening in the autocompleter menu.
Let's say the autocompleter triggers and selects the first match from the list (only selects, not accepts). I would like to execute custom Javascript code when this event happens (the event being auto completer menu selecting active entry from its list of items).
If I understand correctly, it may be possible to execute custom Javascript code when you select and accept an item from the autocomplete list if CompletionItem's Command is defined properly (have not tested yet). But this only handles the event of accepting the selected item from the autoocomplete menu. Could we have similar events that allow injecting custom user code for opening the autocomplete menu, closing the autocomplete menu or selecting an item in the menu?
*questionIssue represents a question, should be posted to StackOverflow (VS Code)
1 participant
Converted from issue
This discussion was converted from issue #2715 on March 03, 2023 13:23.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Just like you can hook events to regular Javascript objects such as
onclick
event tobutton
, I would like to be able to execute custom code when certain events are happening in the autocompleter menu.Let's say the autocompleter triggers and selects the first match from the list (only selects, not accepts). I would like to execute custom Javascript code when this event happens (the event being auto completer menu selecting active entry from its list of items).
If I understand correctly, it may be possible to execute custom Javascript code when you select and accept an item from the autocomplete list if CompletionItem's Command is defined properly (have not tested yet). But this only handles the event of accepting the selected item from the autoocomplete menu. Could we have similar events that allow injecting custom user code for opening the autocomplete menu, closing the autocomplete menu or selecting an item in the menu?
Beta Was this translation helpful? Give feedback.
All reactions