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

Consider moving emmet completion to html completion provider in the html extension #28545

Closed
BuonOmo opened this issue Jun 12, 2017 · 13 comments
Closed
Assignees
Labels
emmet Emmet related issues feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@BuonOmo
Copy link

BuonOmo commented Jun 12, 2017

  • VSCode Version: Code 1.13.0 (376c52b, 2017-06-08T16:41:25.571Z)
  • OS Version: Linux x64 4.4.0-79-generic
  • Extensions:
Extension Author Version
vscode-ungit Hirse 1.0.1
scss-lint adamwalzer 0.0.14
vscode-eslint dbaeumer 1.2.11
githistory donjayamanne 0.2.0
terminal formulahendry 0.0.8
sass-lint glen-84 0.0.4
vscode-scss mrmlnc 0.6.2
debugger-for-chrome msjsdiag 3.1.2
vscode-sass-format sasa 1.1.0

Steps to Reproduce:

  1. add "emmet.useNewEmmet": true to you settings
  2. create a new file file.hbs
  3. type an emmet expression (i.e div.foo)
  4. press tab

expected content

<div class="foo"></div>

actual content

div.foo




this issue seems to be related to #28503.

@ramya-rao-a
Copy link
Contributor

@BuonOmo Thanks for reporting.

Were you using emmet.syntaxProfiles to map handlebars to html before using the new emmet?
If yes, then lets track this in #28286

We'll try and get this into the June milestone

@ramya-rao-a ramya-rao-a added emmet Emmet related issues *duplicate Issue identified as a duplicate of another issue(s) labels Jun 12, 2017
@BuonOmo
Copy link
Author

BuonOmo commented Jun 12, 2017

@ramya-rao-a I wasn't. It worked when I first pressed tab in my IDE. I just tried right now, It doesn't work with or without emmet.syntaxProfiles.

@ramya-rao-a
Copy link
Contributor

Ah! nice catch

In the old emmet mode, https://github.com/Microsoft/vscode/blob/0117f311aa61d1af3018ee0749702dd5e5691738/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts#L264 ensures handlebar gets mapped to html

This doesnt happen in the new model.

Will look into it, thanks for reporting!

@ramya-rao-a ramya-rao-a reopened this Jun 12, 2017
@ramya-rao-a ramya-rao-a added bug Issue identified by VS Code Team member as probable bug and removed *duplicate Issue identified as a duplicate of another issue(s) labels Jun 12, 2017
@ramya-rao-a ramya-rao-a self-assigned this Jun 12, 2017
@ramya-rao-a ramya-rao-a added this to the June 2017 milestone Jun 21, 2017
@ramya-rao-a
Copy link
Contributor

Please read #28286 (comment)

@ramya-rao-a
Copy link
Contributor

Note to verifier:

  • Set emmet.useNewEmmet to true
  • You should be able to use the command Emmet: Expand Abbreviation to expand abbreviations
  • Emmet suggestions should not show up in the suggestion list

@Tyriar Tyriar added the verified Verification succeeded label Jun 29, 2017
@BuonOmo
Copy link
Author

BuonOmo commented Jul 12, 2017

@ramya-rao-a now that the issue is fix, what should I do to have emmet in my hbs templates ?

I tried:

{
    "emmet.includeLanguages": {
        "hbs": "html",
        "handlebars": "html",
        "handlebar": "html"
    }
}

but it just doesn't autocomplete in my file (using 1.14.0).

@ramya-rao-a
Copy link
Contributor

set "emmet.showExpandedAbbreviation": "always"

@BuonOmo
Copy link
Author

BuonOmo commented Jul 12, 2017

It worked, thank you!

@york-xtrem
Copy link

york-xtrem commented Jul 13, 2017

@ramya-rao-a that configuration:
Set "emmet.showExpandedAbbreviation": "always"

It's just a patch but it should not be a solution. Because if you do this affects other files where suggestions should not appear.

@ramya-rao-a
Copy link
Contributor

Good point

Since html completion provider from the in-built html extension works for handlebars files as well, the best solution would be to move the emmet completion provider for html to the html extension.

That way you will get completions at the right (html) places in the file.

@ramya-rao-a ramya-rao-a reopened this Jul 14, 2017
@ramya-rao-a ramya-rao-a changed the title emmet.useNewEmmet doesn't work on handlebars file Consider moving emmet completion to html completion provider in the html extension Jul 14, 2017
@ramya-rao-a ramya-rao-a modified the milestones: July 2017, June 2017 Jul 14, 2017
@ramya-rao-a ramya-rao-a added feature-request Request for new features or functionality and removed verified Verification succeeded bug Issue identified by VS Code Team member as probable bug labels Jul 14, 2017
@york-xtrem
Copy link

This last comment seems to me a better solution ;)
I imagine they will end up giving a solution, support directly to handlebars.

Thank you!

@ramya-rao-a
Copy link
Contributor

Update: Most of the required work is done. See #41652
Waiting for next version of LSP that will have the change for new completion trigger kind, and so this is moved to the next iteration

@ramya-rao-a ramya-rao-a added verification-needed Verification of issue is requested verified Verification succeeded labels Feb 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 30, 2018
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Apr 23, 2018

This move will be reverted in the April milestone
See #29113 (comment) to learn about why we abandoned the move of css emmet completions to the css extension.

Keeping emmet html completions in html extension keeps us in a weird hybrid state of having one kind of completions coming from emmet and another from another built-in extension.

The only advantage of keeping emmet inside html extensions was the ability to get css emmet completions inside style attributes which can be achieved in other ways when emmet completions move back to the emmet extension. See 79a2512

So, reverting the move of emmet html completions from html extension with c314388

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
emmet Emmet related issues feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants