Skip to content

Typing : * $ @ etc in emmet abbreviation stops showing suggestions #29758

Closed

Description

@jens1o
  • VSCode Version: Code - Insiders 1.14.0-insider (63def6e, 2017-06-28T05:16:57.588Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author (truncated) Version
Bookmarks ale 0.15.2
path-intellisense chr 1.4.2
gitignore cod 0.5.0
gitlens eam 4.2.0
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
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.12.0
github-issues-prs ms- 0.2.0
php-docblocker nei 1.2.0
vscode-code-outline pat 0.0.6
vscode-versionlens pfl 0.19.1
vscode-icons rob 7.10.1
sharecode Rol 0.4.1
code-spell-checker str 1.2.0
lorem-ipsum Tyr 1.0.0
vscode-todo-highlight way 0.5.5
highlight-trailing-white-spaces yba 0.0.2

(2 theme extensions excluded)


Steps to Reproduce:

  1. Create a new index.html file
  2. Write html, see there is a html:5 suggestion
  3. Type :, they are gone. 😢

Reproduces without extensions: Yes

Activity

  1. added
    emmet
    on Jun 29, 2017
  2. added
    bug
    on Jun 29, 2017
  3. ramya-rao-a commented on Jun 29, 2017

    @ramya-rao-a
    Contributor

    Johannes Rieken (@jrieken) Looks like something changed in the filtering logic of suggestions. Your recent change around the inComplete:true maybe?

    The emmet completion provider returns a completion list with inComplete set to true.
    In stable, every letter typed would call the completion provider, but : would just filter existing results.

    Stable:

    stablefilter

    In the current Insiders, every letter typed still calls the completion provider, but : filters out everything

    Current Insiders:

    currentfilter

  4. added
    suggest
    on Jun 29, 2017
  5. jens1o commented on Jun 29, 2017

    @jens1o
    ContributorAuthor

    Yes, I was curious in the first moment why it stopped working.

  6. jrieken commented on Jun 29, 2017

    @jrieken
    Contributor

    Oh, bummer... That's a regression from a change I made yesterday to fix #28400. I'll might revert that change...

  7. jens1o commented on Jun 29, 2017

    @jens1o
    ContributorAuthor

    Sorry to bother you. :/

  8. jrieken commented on Jun 29, 2017

    @jrieken
    Contributor

    Hm, reverting 5ad1618 (which is the fix for #28400) doesn't help. Ramya Rao (@ramya-rao-a) It seems that : is registered as a trigger character and when we see that we invoke the provider in question and merge its results with the existing result. No, the problem is that that provider doesn't return anything and that the existing results don't match anymore because we compare html: with html etc. Needs more drilling...

    screen shot 2017-06-29 at 09 32 03

  9. jrieken commented on Jun 29, 2017

    @jrieken
    Contributor

    Johannes Rieken (@jrieken) Looks like something changed in the filtering logic of suggestions. Your recent change around the inComplete:true maybe?

    So, we did make a change yesterday (I think too early for the version this was reported for) which does the following: When a suggestion result is incomplete and if the word as stopped we don't re-trigger suggestions but filter the suggestions we currently have. So, when typing html: the word ends and we stop asking for new suggestions (that might be a problem with expansions form html:foo"bar but I am unsure that exists). However, since the results already contain html:5 it will be shown and can be selected.

    I wonder if this was caused by having another provider that registers with the : trigger character (I believe 7ba1dcf). So what happens, and I don't think much has changed there, is that hitting a trigger-character only asks that provider (which doesn't return a result). Its (empty) result is being merged with the existing completions (from the incomplete provider) which didn't get a chance to update and hence fail the filter condition.

    In short, there is something off. I am not yet convinced that a recent change caused this but things are complex. I acknowledge that there is a race between incomplete suggestions and trigger-characters, however I am a little scared to make a change late in the endgame.

  10. jrieken commented on Jun 29, 2017

    @jrieken
    Contributor

    Ok, the competing provider is the html-extension that registers those completion item provider: https://github.com/Microsoft/vscode/blob/master/extensions/html/server/src/htmlServerMain.ts#L75. Still not sure what as changed but I'll think about a fix

  11. jrieken commented on Jun 29, 2017

    @jrieken
    Contributor

    Ramya Rao (@ramya-rao-a) I do have a change ready that makes sure to also resolve incomplete suggest results when a trigger character is being hit. However, when I ask emmet for completions with the html: prefix I just get that back, so no html:5. Fixing this bug uncovers another bug...

    I believe that this used to work by accident (more than one thing is off here) and that's because before the completion item would have a just the label html:5 and now it has a filterText which ishtml. The filter text, when provided, must match, but it doesn't because it's shorter than html:.

    screen shot 2017-06-29 at 14 26 24

    screen shot 2017-06-29 at 14 28 27

    Final word: There is something off when resolving incomplete suggest results when a trigger character is being hit, changing that is too risky IMO, and reveals other bugs in emmet (e.g. hit Ctrl+Space after html: in any version). So I'd opt for removing/fixing the filter text and things should be back to normal.

  12. 3 remaining items

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

    @ramya-rao-a
    Contributor

    Still an issue for abbreviations like ul*2
    The suggestions disappear when * is typed.

    Re-opening

  14. jrieken commented on Jun 29, 2017

    @jrieken
    Contributor

    Yeah, whenever we hit a word stops with incomplete results and when the result isn't matching that we cancel. That was done in 5ad1618. Feel free to revert and reopen the corresponding issue. I am on vacation now... 🏖

  15. jens1o commented on Jun 29, 2017

    @jens1o
    ContributorAuthor

    Happy holidays Johannes Rieken (@jrieken) 😃

  16. changed the title [-]Typing `html:5` does not result in an suggestion in emmet[/-] [+]Typing : * $ @ etc in emmet abbreviation stops showing suggestions[/+] on Jun 29, 2017
  17. ramya-rao-a commented on Jun 30, 2017

    @ramya-rao-a
    Contributor

    I add the * and $ to trigger char list as well. So we are good on those fronts.

  18. ramya-rao-a commented on Jun 30, 2017

    @ramya-rao-a
    Contributor

    Note to verifier:

  19. nanaasumadu commented on Jun 30, 2017

    @nanaasumadu

    Ramya Rao (@ramya-rao-a)

    Just tested emmet suggestions with : and * in the latest insider build and there work fine. $ also works in my php file but I am not sure if that's coming from emmet or the language server.

    Thank you so much for your great work.

  20. ramya-rao-a commented on Jun 30, 2017

    @ramya-rao-a
    Contributor
  21. 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

bugemmetsuggestverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions