Skip to content

1.13.0 | New Emmet expansion suggestions don't honor emmet.syntaxProfiles setting #28286

Closed

Description

@zackkrida
  • VSCode Version: 1.13.0
  • OS Version: OSX 10.12.5

Steps to Reproduce:

  1. Add new setting "emmet.useNewEmmet": true,
  2. Enter a php file and type any HTML tag
  3. The expansion suggestions do not appear

Activity

  1. blukai commented on Jun 9, 2017

    @blukai

    The same with vue,
    With emmet.useNewEmmet set to true it doesn't work.

    "emmet.syntaxProfiles": {
      "vue-html": "html",
      "vue": "html"
    }
    
  2. hleon57 commented on Jun 9, 2017

    @hleon57

    blukai yea happened to me too 😢

  3. ramya-rao-a commented on Jun 9, 2017

    @ramya-rao-a
    Contributor

    Thanks for reporting this.

    The feature of mapping a non emmet supported language to emmet supported language is not yet implemented in the new emmet model.

    I have added this to the June plan for emmet.

    For now, you will have to turn emmet.useNewEmmet off to get emmet expansions in any file that is not among the below

    'html', 'xml', 'xsl', 'jsx', 'js', 'pug', 'slim', 'haml', 'css', 'sass', 'scss', 'less', 'sss', 'stylus'

  4. changed the title [-]1.13.0 | Emmet expansion suggestions don't appear in .php files[/-] [+]1.13.0 | New Emmet expansion suggestions don't honor emmet.syntaxProfiles setting[/+] on Jun 12, 2017
  5. ramya-rao-a commented on Jun 20, 2017

    @ramya-rao-a
    Contributor

    With 1809bb2 the emmet.syntaxProfiles setting works as before in the new emmet

    This will be out in the coming Wednesday's (21st June) Insiders build

  6. nanaasumadu commented on Jun 21, 2017

    @nanaasumadu

    Ramya Rao (@ramya-rao-a)

    Can PHP with embedded HTML be added to the supported language list?

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

    @ramya-rao-a
    Contributor

    Nana Asumadu (@nanaasumadu) Doesnt the below work for you?

    "php: "html"
    }
    ``
    
  8. ramya-rao-a commented on Jun 23, 2017

    @ramya-rao-a
    Contributor

    After enabling the use of emmet.syntaxProfiles for both Emmet: Expand Abbreviation command and the emmet suggestions, we have seen issues where the suggestions pop up in irrelevant places and tend to get either noisy or are of incorrect syntax (eg: gives html suggestions inside a style block in a vue file)

    See #29318 #29185 and #29114

    This is because the emmet extension is not aware of embedded languages (case of style blocks in vue files or js code in jsx files) and wrong locations (like <? in php)

    Therefore, its best that we leave the decision to trigger emmet suggestions to language specific extensions who know better.

    Conclusion:

    • You can still use emmet.syntaxProfiles to get Emmet: Expand Abbreviation command to give you emmet abbreviation expansions. Bind a keyboard shortcut to it (just not Tab)
    • Emmet suggestions will not be showing up for languages which have been emmet enabled using emmet.syntaxProfiles
    • Language extensions can easily trigger emmet completions by using the vscode-emmet-helper module. See Enable language extensions to call emmet completion provider #29114 (comment)

    Thanks to everyone who provided feedback!

  9. nanaasumadu commented on Jun 26, 2017

    @nanaasumadu

    Ramya Rao (@ramya-rao-a)

    Emmet: Expand Abbreviation has stoped working for php files in the vscode-insiders build 2017-06-26T05:03:31.319Z. It was working fine in the build on 2017-06-23.

    I still have the following in my settings.json file:

    "emmet.useNewEmmet": true,
    "emmet.syntaxProfiles" : {
    "php": "html"
    }

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

    @ramya-rao-a
    Contributor

    Nana Asumadu (@nanaasumadu) I was pretty happy when I saw your comment on emmet working again for you after re-installing the Insiders.

    Looks like we are back to square one.

    The command Emmet: Expand Abbreviation continues to work for me in php files

    Jens Hausdorf (@jens1o) Can you give it a try?

  11. nanaasumadu commented on Jun 26, 2017

    @nanaasumadu

    Ramya Rao (@ramya-rao-a) Yes, it was all working until I install the latest build of vscode-insider yesterday. Is there any way of reverting to the previous build for testing?? I am certain something has changed in the latest build that is causing that.

    I have tried on two different Macs with the same result.

  12. ramya-rao-a commented on Jun 26, 2017

    @ramya-rao-a
    Contributor

    Nana Asumadu (@nanaasumadu) I don't think we can go back to a previous version of Insiders.

    • Are you referring to the emmet auto complete in php or the command Emmet: Expand Abbreviation?
    • Does it work with emmet.useNewEmmet: false?
    • Set emmet.useNewEmmet back to true. Open your dev tools (Developer: Toggle Developer Tools). Go to Sources open the file emmetAction.ts and add a breakpoint as shown below and run the Emmet: Expand Abbreviation command again. Does it hit the breakpoint? What is the value of syntax?

    screen shot 2017-06-26 at 3 11 29 pm

  13. jens1o commented on Jun 27, 2017

    @jens1o
    Contributor

    Timezones...

    Ramya Rao (@ramya-rao-a) It works for me:

    image
    image
    image

    However, it is bound to Tab, but I do not set it to it, nor Tab actually executes the command. (found the issue: #27611)

  14. nanaasumadu commented on Jun 27, 2017

    @nanaasumadu

    Ramya Rao (@ramya-rao-a) After setting "emmet.useNewEmmet" to "false" and "true" again, Emmet: Expand Abbreviation" works in my php file. As mentioned above, tab completion doesn't work.

    If I, however, set "emmet.useNewEmmet" to false, tab completion works.

    Emmet auto complete in php doesn't work now when "emmet.useNewEmmet" is set to true. It was working fine in vscode-insider build on 23/06/17.

    Any ideas??

  15. nanaasumadu commented on Jun 27, 2017

    @nanaasumadu

    Ramya Rao (@ramya-rao-a)

    I think this issue may be what I am experiencing. I didn't realise that emmet suggestions has been disabled for php and responsibility passed on to the language specific extensions.

    Is there a fallback until the extension authors can make their extensions "emmet" aware to call emmet completion provider instead of the emmet extension itself trying to suggest ?

    I think if you can provide a user setting such "emmet.useLanguageExtension" which can be set to true or false as fallback will be good.

    Alternatively, are you able to provide vscode-emmet-helper as a VSIX and provide an option for a user to set which language such as "emmet.autocompleteSuggestion": "php" ?

    Some of us find the emmet suggestions and completions very useful when working in PHP/HTML mixed environment.

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

    @ramya-rao-a
    Contributor

    Jens Hausdorf (@jens1o) Thanks!

    We are definitely moving away from binding Tab to Emmet. See https://code.visualstudio.com/updates/v1_13#_emmet-abbreviation-expansion-in-suggestion-list for more on this.

    Nana Asumadu (@nanaasumadu) Let's use #29532 to track the option to allow suggestions to show up when the language is not a pure markup or stylesheet.

    Meanwhile, please look at #29678 and add your thoughts there.
    It is about using a different setting than emmet.syntaxProfiles to enable emmet abbreviation in languages other than the ones that are supported by default.

  17. nanaasumadu commented on Jun 28, 2017

    @nanaasumadu

    Ramya Rao (@ramya-rao-a)
    I have tested the new setting

    "emmet.includeLanguages": { "php": "html" },
    but emmet suggestion does not work.

    html file
    image

    php file
    image

    "Emmet: Expand Abbrevation", however works.

  18. jens1o commented on Jun 28, 2017

    @jens1o
    Contributor

    As far as I interpreted the code, this is by design.

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

    @ramya-rao-a
    Contributor

    Nana Asumadu (@nanaasumadu) Am using #29532 to track the emmet suggestions for languages that are not pure markup or stylesheet

  20. nanaasumadu commented on Jun 28, 2017

    @nanaasumadu

    Ramya Rao (@ramya-rao-a) Sorry about that. I have copied my comments to #29532 for completeness.

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

    @ramya-rao-a
    Contributor

    No problem at all

  22. 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

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions