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

Additions to "emmet.includeLanguages" require reload #29968

Closed
chrmarti opened this issue Jun 30, 2017 · 8 comments · Fixed by #29986
Closed

Additions to "emmet.includeLanguages" require reload #29968

chrmarti opened this issue Jun 30, 2017 · 8 comments · Fixed by #29986
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues verified Verification succeeded
Milestone

Comments

@chrmarti
Copy link
Contributor

  • VSCode Version: Code - Insiders 1.14.0-insider (7e29372, 2017-06-30T05:07:32.086Z)
  • OS Version: Darwin x64 15.6.0
  • Extensions: none

Steps to Reproduce:

  1. Launch with no emmet.includeLanguages
  2. Add, e.g., "emmet.includeLanguages": { "javascript": "javascriptreact" }
  3. Observe: No Emmet proposals are shown in .js files
  4. Reload and observe: Emmet proposals are shown in .js files
@chrmarti chrmarti added the emmet Emmet related issues label Jun 30, 2017
@vscodebot vscodebot bot added the insiders label Jun 30, 2017
@ramya-rao-a ramya-rao-a added this to the July 2017 milestone Jun 30, 2017
@ramya-rao-a ramya-rao-a added the help wanted Issues identified as good community contribution opportunities label Jun 30, 2017
@ramya-rao-a
Copy link
Contributor

The fix is to listen to the config change event and register new completion providers for the newly added languages in includedLanguages

@jens1o
Copy link
Contributor

jens1o commented Jun 30, 2017

I take a look, I saw this in other extensions and it isn't that hard.

@ramya-rao-a
Copy link
Contributor

Yes, not hard at all. Feel free to submit a PR

@ramya-rao-a ramya-rao-a removed the help wanted Issues identified as good community contribution opportunities label Jul 22, 2017
@ramya-rao-a ramya-rao-a added the bug Issue identified by VS Code Team member as probable bug label Aug 1, 2017
@roblourens
Copy link
Member

I can't get it to work, reload or not.

@jens1o
Copy link
Contributor

jens1o commented Aug 4, 2017

It works for me, for example when I add XML files manually to emmet. And those are the same methods, so when it works for the standard languages, it should work for custom ones too.

@rebornix rebornix added verified Verification succeeded verification-found Issue verification failed and removed verified Verification succeeded labels Aug 4, 2017
@rebornix
Copy link
Member

rebornix commented Aug 4, 2017

I still didn't see Emmet proposals after adding this setting. Should those proposals show up in the suggestion window? @ramya-rao-a

@rebornix rebornix added verified Verification succeeded and removed verification-found Issue verification failed labels Aug 4, 2017
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Aug 4, 2017

The reason why @roblourens and @rebornix were not able to get any suggestions was because they hadn't set emmet.showExpandedAbbreviation to always

I had initially introduced always as an option to emmet.showExpandedAbbreviation setting because, back then the emmet suggestions (not css) were too eager and showing up for every letter that was typed (because every word/letter was a valid abbreviation. eg abc -> <abc></abc>)

But in the last month there have been many improvements and now non css emmet suggestions only show up if the word is one of the commonly used html tags or is a valid abbreviation with operators like >, $, * etc. or is a custom emmet snippet.

This "always" vs "markupAndStylesheetOnly" option may not be required any more

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Aug 6, 2017

On spending more time thinking on #29968 (comment), I feel its not wise to remove the "markupAndStylesheetOnly" option altogether.

There can still be cases where emmet suggestions showing up in wrong places annoying users.

Instead, as a middle ground, we can change the default for this setting to always

This way, the moment a mapping has been added to emmet.includeLanguages, emmet suggestions will show up and the command Emmet: Expand Abbreviation will use the mapped syntax.
Anyone finding this as noise, can update emmet.showExpandedAbbreviation to inMarkupAndStylesheetFilesOnly. The command Emmet: Expand Abbreviation will continue to use the mapped syntax.

This is done with dd7adcc

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants