Skip to content

Purpose of emmet.syntaxProfiles is unclear #29678

Closed

Description

@Tyriar
  • VSCode Version: Code - Insiders 1.14.0-insider (15b579d, 2017-06-27T05:11:33.154Z)
  • OS Version: Linux x64 4.10.0-24-generic
  • Extensions:
Extension Author (truncated) Version
EditorConfig Edi 0.9.3
lorem-ipsum Tyr 1.0.0
sort-lines Tyr 1.3.0
vscode-svgviewer css 1.4.2
tslint eg2 0.15.0
git-project-manager fel 1.3.2
md-navigate jri 0.0.1
vscode-scss mrm 0.6.2
seti-icons qin 0.1.3
vim vsc 0.9.0

(1 theme extensions excluded)


#29500

I set this but it didn't allow me to expand within a .ts file.

"emmet.syntaxProfiles": {
  "typescript": "html"
},

Activity

  1. added
    emmet
    on Jun 27, 2017
  2. ramya-rao-a commented on Jun 27, 2017

    @ramya-rao-a
    Contributor

    Did you try the Emmet: Expand Abbreviation command or you are expecting the auto completion?

    The former should work. The latter I disabled as it becomes too noisy when emmet suggestions pop up every where in the while instead of just the html/css parts of the file.

  3. Tyriar commented on Jun 27, 2017

    @Tyriar
    ContributorAuthor

    Ramya Rao (@ramya-rao-a) I tried auto completion, if that's not supported maybe there should be a note in the setting description?

  4. Tyriar commented on Jun 27, 2017

    @Tyriar
    ContributorAuthor

    Ramya Rao (@ramya-rao-a) it worked via command.

  5. added
    under-discussion
    on Jun 27, 2017
  6. Tyriar commented on Jun 27, 2017

    @Tyriar
    ContributorAuthor

    Ramya Rao (@ramya-rao-a) I can't imagine actually doing this and finding it useful. There should be a note in the description though to make it clear how to use it for people like me who don't really use the command.

  7. ramya-rao-a commented on Jun 27, 2017

    @ramya-rao-a
    Contributor

    Using syntaxProfiles for mapping a language to one of the emmet supported ones was introduced back in September. See https://code.visualstudio.com/updates/v1_5#_settings-to-enabledisable-emmet-for-languages

    syntaxProfiles was already being used for a whole different purpose. Which was to define the output profile as defnied here: https://docs.emmet.io/customization/syntax-profiles/

    This was re-used in September to be used for enabling emmet in other languages.

    Back in February, I fixed a few issues around this. But the real fix is to separate the output profile settings from the language mapping settings which I have been wanting to do for a while.

  8. ramya-rao-a commented on Jun 28, 2017

    @ramya-rao-a
    Contributor

    Here is my proposal:

    In the new emmet model, we will use a new setting emmet.includeLanguages to enable emmet abbreviations in languages that are not supported by default.
    emmet.syntaxProfiles will be used only for setting the output profile as defined https://docs.emmet.io/customization/syntax-profiles/ and not to map languages to emmet supported modes

    Pros:

    Cons

    • Existing VS Code emmet users who have been using emmet.syntaxProfiles to map languages will have to make a change.
    • There are a few docs and tweets out there that we need to update

    cc Erich Gamma (@egamma) Denis Malinochkin (@mrmlnc)

  9. ifzm commented on Jun 28, 2017

    @ifzm

    I found it now emmet.syntaxProfiles & emmet.useNewEmmet: true can not coexist (
    For example: I set vue to syntaxProfiles, and then set useNewEmmet: true, in the vue file emmet can not be used.

  10. ramya-rao-a commented on Jun 28, 2017

    @ramya-rao-a
    Contributor

    Jim (@ifzm) Are you referring to the Emmet: Expand Abbreviation command or the emmet abbreviations showing up in the suggestion list? The former should work as long as you have the mapping "vue-html": "html". The suggestions will work once they are implemented by language specific extensions. You can follow #29114

  11. 6 remaining items

  12. added
    verification-needed
    and removed
    under-discussion
    on Jun 28, 2017
  13. ifzm commented on Jun 29, 2017

    @ifzm

    nice 👍

  14. yordis commented on Jul 5, 2017

    @yordis

    Ramya Rao (@ramya-rao-a) is this deployed yet?

  15. ramya-rao-a commented on Jul 6, 2017

    @ramya-rao-a
    Contributor

    In the Insiders, yes.
    For the stable build, wait for the release of VS Code 1.14
    In both cases ensure "emmet.useNewEmmet" is ser to true

  16. Elyx0 commented on Jul 17, 2017

    @Elyx0

    VERSION: 1.14

    My user settings contained the following:

        "emmet.useNewEmmet": true,
        "emmet.syntaxProfiles": {"handlebars": "html"},
        "emmet.includeLanguages": {"handlebars": "html"},
    

    Emmet wasn't available in my handlebars files :(

    Only fix was "emmet.showExpandedAbbreviation": "always"

  17. ramya-rao-a commented on Jul 17, 2017

    @ramya-rao-a
    Contributor

    elyx0 (@Elyx0) That is covered in #28545 Please follow that issue

  18. kopickik commented on Sep 26, 2017

    @kopickik

    If anyone else wound up here trying to get html snippets to work in *.blade.php files, the fix is to add them to blade.json instead of html.json from the User Snippets menu.

  19. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

emmetverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions