fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.63k stars 262 forks source link

Add completion for tags, attributes, and attribute values #1253

Closed Olivia5k closed 2 years ago

Olivia5k commented 2 years ago

Completion is added, replacing calls to read-from-minibuffer when prompting for tags, attributes, and attribute values. A list of predetermined tags and attributes are added as completion targets, and the list can be changed via customize if the user so desires.

Also, a smaller change made to web-mode-attribute-insert allows both the attribute and the value to be optionally specified when called. This lets the user skip the prompt if the attribute is known; a good use case is to have a keybinding to add a common attribute like class.

I hope the placing of the added functions and variables are okay. I tried to follow the structure of the file. :slightly_smiling_face:

fxbois commented 2 years ago

Thx for the commit