Override default_attributes
Nobody has claimed this yet.
- Dominant language
- Vim Script
- Stars
- 6.5k
- Forks
- 414
- PR merge metrics
- No merged PRs in 30d
Description
At the moment I can set default attribute for specific element using:
let g:user_emmet_settings = {
\ 'html': {
\ 'quote_char': '',
\ 'default_attributes': {
\ 'div': {'id': ''},
\ },
\ },
\}
However if for elements with defaults defined such as label that has the for attribute set, when trying to reset this so label won't add the for attribute with:
let g:user_emmet_settings = {
\ 'html': {
\ 'quote_char': '',
\ 'default_attributes': {
\ 'label': {},
\ },
\ },
\}
Unfortunately does not seem to work since when expanding label still prints the for attribute even though I have reseted within g:user_emmet_settings.
Is there anyway to reset/override the default attributes?
Thanks in advance.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the default attribute definition for label in autoload/emmet.vim, linked in the issue, and compare it with how g:user_emmet_settings is merged. Reproduce the label expansion using the shown Vim configuration. Done means an empty label override prevents the default for attribute while preserving other configured defaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, vim
- Domain
- tooling, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100