Skip to content

Emmet suggestions in php file is too noisy #29318

Closed

Description

@jens1o
  • VSCode Version: Code - Insiders 1.14.0-insider (779a7df, 2017-06-23T05:59:57.891Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author (truncated) Version
path-intellisense chr 1.4.2
gitlens eam 4.1.3
tslint eg2 0.15.0
LogFileHighlighter emi 1.1.1
vscode-reveal evi 0.0.9
php-debug fel 1.10.1
php-intellisense fel 1.4.1
auto-close-tag for 0.4.2
gc-excelviewer Gra 1.1.15
GitHubIssues Hoo 0.1.2
composer ika 0.5.0
smarty imp 0.2.0
json-to-ts Mar 1.4.3
vscode-apache mrm 1.1.1
cpptools ms- 0.11.4
php-docblocker nei 1.2.0
vscode-versionlens pfl 0.19.1
vscode-icons rob 7.9.0
sharecode Rol 0.4.1
code-spell-checker str 1.2.0
vscode-todo-highlight way 0.5.5
highlight-trailing-white-spaces yba 0.0.2

(1 theme extensions excluded)


Steps to Reproduce:

  1. Create a emmet.php.
  2. Write <? (everything is normal)
  3. Write php, get this:
    image
  4. Hit enter
  5. Get this:
    image

😢

Activity

  1. added
    bug
    php
    on Jun 23, 2017
  2. jens1o commented on Jun 23, 2017

    @jens1o
    ContributorAuthor

    roblourens You're not meant. This is for Ramya Rao (@ramya-rao-a)

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

    @ramya-rao-a
    Contributor

    Have you mapped PHP to html using emmet.syntaxProfiles setting ?

  4. jens1o commented on Jun 23, 2017

    @jens1o
    ContributorAuthor

    Yes, I did.

  5. ramya-rao-a commented on Jun 23, 2017

    @ramya-rao-a
    Contributor

    This is yet another case where it is better for language specific extensions to call emmet completion provider instead of the emmet extension itself trying to suggest completions in a language that is not pure markup language.

    The language specific extensions better understand their language and can trigger emmet completion provider at the right locations.

    See #29114

    I'll disable the emmet completions for cases when emmet.syntaxProfiles is used.
    The command Emmet: Expand Abbreviation will still honor emmet.syntaxProfiles and will work as before (just not bound to Tab, you will have to assign a new key binding)

  6. added
    emmet
    and removed
    php
    on Jun 23, 2017
  7. jens1o commented on Jun 23, 2017

    @jens1o
    ContributorAuthor

    Well, then I would expect that from the internal php extension. :/

  8. 2 remaining items

  9. added
    bug
    and removed
    bug
    on Jun 26, 2017
  10. ramya-rao-a commented on Jun 26, 2017

    @ramya-rao-a
    Contributor

    Note to verifier:

    • Set emmet.useNewEmmet to true and emmet.includeLanguages to {"php" : "html"}
    • You should be able to use the command Emmet: Expand Abbreviation to expand abbreviations
    • Emmet suggestions should not show up in the suggestion list
  11. changed the title [-]Emmet: Writing a php start tag is torture.[/-] [+]Emmet suggestions in php file is too noisy[/+] on Jun 26, 2017
  12. jrieken commented on Jun 29, 2017

    @jrieken
    Contributor

    Emmet suggestions should not show up in the suggestion list

    ✅

    You should be able to use the command Emmet: Expand Abbreviation to expand abbreviations

    Yes, but it expands to <?<php></php> which I believe isn't valid php? Also, in the command palette the expand command is shown as being bound to Tab but actually pressing tab doesn't expand it...

  13. ramya-rao-a commented on Jun 29, 2017

    @ramya-rao-a
    Contributor

    The verification step was more about testing general abbreviations, which work.

    expands to <?<php></php>

    #29774 is tracking this particular case.

    command palette the expand command is shown as being bound to Tab but actually pressing tab doesn't expand it.

    See #27611
    In the new emmet model, tab will no longer be bound to the Emmet: Expand Abbreviation command. But since the old model still does support it, you end up seeing it

  14. added
    verified
    and removed
    verification-found
    on Jun 29, 2017
  15. ramya-rao-a commented on Aug 10, 2017

    @ramya-rao-a
    Contributor

    Jens Hausdorf (@jens1o) With all the improvements we did in 1.15, emmet suggestions in non html/css files has been greatly reduced.

    Therefore, I have set emmet.showExpandedAbbreviation to always by default, so that once someone adds a mapping in emmet.includeLanguges, they start seeing the emmet suggestions right away.

    roblourens found an issue for php, where this can still be noisy. See #32207

    Can you add on to that issue if you find any other instances in php where you see the emmet suggestions as noise?

  16. jens1o commented on Aug 10, 2017

    @jens1o
    ContributorAuthor

    Ramya Rao (@ramya-rao-a) Yeah, I'm going to use that issue. Thanks for the heads up!

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

bugemmetverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions