Open taylorotwell opened 1 year ago
@deathaxe do you have any thoughts on why this is happening and how to prevent it?
The only special thing of this package is a syntax specific auto_completion_selector
, which intents to enable autocompletions within template tags. It would require a nonwhitespace character to be typed, to open the panel.
view.settings().get("auto_complete_selector")
view.settings().get("auto_complete_triggers")
Is completion panel directly opened by typing >
? Maybe >
was added to auto_complete_triggers
by a plugin (or user customization)? _I am aware of LSP manipulating view-specific auto_complete_triggers
setting based on what it gets from a language servers._
I get this state only by hitting ctrl+space
after the tag.
@deathaxe
Build 4143
No LSP.
Other maybe relevant plugins I have installed: ECMAScript Syntax, PHP Companion, Vue Syntax Highlight
Did you set syntax to "HTML (Blade)" before calling view.settings().get(...)
?
I'd expect
>>> view.settings().get("auto_complete_selector")
'( meta.tag | meta.embedded.directive ) - comment'
>>> view.settings().get("auto_complete_triggers")
[{'characters': '<', 'selector': 'text.html, text.xml'}, {'rhs_empty': True, 'selector': 'punctuation.accessor'}]
Listed syntaxes seem unrelated. Their code doesn't contain hints and I can't reproduce the issue, if they are installed.
You could try to log commands, to see whether anything is triggering auto_complete
command when closing tags.
>>> sublime.log_commands()
Trying that I've not seen any command when typing >
.
Sorry, my settings match yours - forgot I had modified them trying to resolve the issue.
Logging commands doesn't show any commands being fired when the auto-complete window shows up.
So weird. 🙃
Indeed.
Blade is just inherits from ST's PHP and HTML re-using most syntax stuff and the html completion plugin. It extends core syntaxes in the same way as Vue and other packages.
Did you try to setup a completely vanilla ST with only Blade installed? Does it happen then, too?
I have been able to narrow it down to something within Livewire 3's legacy_tests/Browser
directory. When that directory is removed it does not happen. It also does not happen if I tell Sublime to not index "vendor" files (this file I mentioned is in my vendor directory).
Does the Blade plugin attempt to do anything intelligent based on the Blade declarations / components in other files in the application?
This package provide plain syntax definitions and a handful of completions. There's no plugin or any other kind of black magic provided.
Sometimes when closing an HTML tag, I am prompted for tax expansion unexpectedly. This does not happen on Sublime's HTML syntax - only when using the HTML (Blade) syntax. It seems related to putting colons in attributes and then closing the tag.
Any help solving this extremely appreciated.
Below is a minimal HTML snippet to reproduce the problem.