Closed ultimike closed 1 year ago
Hey @ultimike!
I think this is a VS Code specific setting, see the intellisense documentation
By default, VS Code pre-selects the previously used suggestion in the suggestion list. This is very useful as you can quickly insert the same completion multiple times. If you'd like different behavior, for example, always select the top item in the suggestion list, you can use the
editor.suggestSelection
setting.
Also, see the editor.snippetSuggestions
setting - this is the one I use to always float snippets to the top of the list. This might be less helpful for someone that uses intelliphense heavily.
By default, VS Code shows snippets and completion proposals in one widget. You can control the behavior with the
editor.snippetSuggestions
setting. To remove snippets from the suggestions widget, set the value to "none". If you'd like to see snippets, you can specify the order relative to suggestions; at the top ("top"), at the bottom ("bottom"), or inline ordered alphabetically ("inline"). The default is "inline".
Ah - makes sense. Thanks so much. I just added the following to my settings.json:
// Use this to prioritize Drupal Smart Snippets in the UI.
"editor.snippetSuggestions": "top",
-mike
Re-opening as something has changed - the "editor.snippetSuggestions": "top",
trick isn't working anymore. In fact, unless I completely disable PHP Intelephense extension, I don't see the Drupal Smart Snippets snippets.
Perhaps a recent PHP Intelephense update broke something?
thanks, -mike
There appear to be a couple of other issues on the intelephense repo suggesting it's broken autocomplete, for example: https://github.com/bmewburn/vscode-intelephense/issues/2493
This was an issue with VS Code 1.75.0, and should be fixed as part of 1.75.1
https://github.com/microsoft/vscode/issues/173244#issuecomment-1420986719
Hi Andy,
On my install of VSCode (Mac OS X, version 1.67.0), when, on a new line, I start typing
hook_form
I see the list of matching hooks appear, when I select one and hit "enter", I get the following:But, when I type
function hook_form
and then select the same hook, I get:(including the initial
function
above the comment)I believe this is being caused by some type of conflict with the PHP Intelephense extension (which I also have installed). When I disable PHP Intelephense, I get the correct behavior from Drupal Smart Snippets. Any idea if there's anything that can be done either on my end with a config change or in your extension to fix this?
thanks, -mike