Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emmet tweaks: simplify set/reset Emmet preferences and syntax profiles #11003

Merged
merged 1 commit into from
Aug 28, 2016
Merged

Emmet tweaks: simplify set/reset Emmet preferences and syntax profiles #11003

merged 1 commit into from
Aug 28, 2016

Conversation

mrmlnc
Copy link
Contributor

@mrmlnc mrmlnc commented Aug 26, 2016

Source: #9500 and #9002

The process of set/reset preferences and syntax profiles for Emmet has been simplify. We don’t have to support undocumented features of Emmet, which don’t have any sense for the end user.

Just use Emmet API.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 60.967% when pulling f6677f1 on mrmlnc:fix-emmet-preferences-reset into 6ae0573 on Microsoft:master.

@egamma egamma merged commit 7efc7db into microsoft:master Aug 28, 2016
@egamma
Copy link
Member

egamma commented Aug 28, 2016

LGTM to thanks 🌹

@egamma
Copy link
Member

egamma commented Sep 1, 2016

@mrmlnc since this change this preference setting results in an error:

{
    "emmet.preferences": {
         "less.propertyEnd": "END"
     }
}

image

Therefore my question is less.propertyEnd a supported setting?
The implementation before this PR made sure that this property is defined in the case emmet complains:

        for (let key in preferences) {
            try {
                _emmet.preferences.set(key, preferences[key]);
            } catch (err) {
                _emmet.preferences.define(key, preferences[key]);
            }
        }

@mrmlnc
Copy link
Contributor Author

mrmlnc commented Sep 1, 2016

@egamma, unfortunately, it's my mistake. I forgot about it. 😞

This PR, as specified in the description to it, removes support for undocumented features of Emmet, which don’t have any sense for the end user.

Correct code:

try {
  _emmet.loadPreferences(emmetPreferences.preferences);
  _emmet.loadProfiles(emmetPreferences.syntaxProfiles);
} catch(err) {
  // silence
}

Available settings: http://docs.emmet.io/customization/preferences/

egamma added a commit that referenced this pull request Sep 1, 2016
@egamma
Copy link
Member

egamma commented Sep 1, 2016

@mrmlnc no problem, pushed the fix, thanks.

@egamma egamma added this to the August 2016 milestone Sep 5, 2016
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants