Git Product home page Git Product logo

Comments (8)

Medalink avatar Medalink commented on August 18, 2024

@deathaxe do you have any thoughts on why this is happening and how to prevent it?

from laravel-blade.

deathaxe avatar deathaxe commented on August 18, 2024

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.

see:

"auto_complete_selector": "( meta.tag | meta.embedded.directive ) - comment",

  1. What ST version is it?
  2. What's the output of
    • view.settings().get("auto_complete_selector")
    • view.settings().get("auto_complete_triggers")
  3. Is any language server involved?
  4. Any other completion plugins?

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.

from laravel-blade.

taylorotwell avatar taylorotwell commented on August 18, 2024

@deathaxe

  1. Build 4143

CleanShot 2023-07-24 at 10 34 29@2x
  1. No LSP.

  2. Other maybe relevant plugins I have installed: ECMAScript Syntax, PHP Companion, Vue Syntax Highlight

from laravel-blade.

deathaxe avatar deathaxe commented on August 18, 2024

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 >.

from laravel-blade.

taylorotwell avatar taylorotwell commented on August 18, 2024

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. 🙃

from laravel-blade.

deathaxe avatar deathaxe commented on August 18, 2024

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?

from laravel-blade.

taylorotwell avatar taylorotwell commented on August 18, 2024

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?

from laravel-blade.

deathaxe avatar deathaxe commented on August 18, 2024

This package provide plain syntax definitions and a handful of completions. There's no plugin or any other kind of black magic provided.

from laravel-blade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.