Polymer / atom-plugin

Provides autocompletion, linting, and more for web components.
Other
32 stars 8 forks source link

Autocompletion of attribute value autocompletes with default attribute suggestions #7

Closed TimvdLippe closed 8 years ago

TimvdLippe commented 8 years ago
  1. Open the example project
  2. Type <behavior
  3. Hit enter
  4. Go to the space in the opening tag (step is unnecessary after resolution of #1)
  5. Hit ctrl + space
  6. Hit key arrow down
  7. Hit enter (e.g. autocomplete to inherit-please="number")
  8. Observe that number is currently selected (as expected)
  9. Enter a

    Expected behavior

Autocompletion is empty, or shows possible bindings of properties defined on the current element. E.g. when working on the template of behavior-test-elem and I declare paper-button, when I select raised I expect autocompletion to show raised="[[localProperty]]" since localProperty is defined on behavior-test-elem.

Actual behavior

Autocompletion shows all attributes and custom listeners, which if you hit enter generates even more autocompletion.

rictic commented 8 years ago

Need to differentiate between attribute names and values in https://github.com/Polymer/polymer-analyzer/blob/master/src/editor-service/local-editor-service.ts#L204