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

Emmet suggestions in php file is too noisy #29318

Closed
jens1o opened this issue Jun 23, 2017 · 12 comments
Closed

Emmet suggestions in php file is too noisy #29318

jens1o opened this issue Jun 23, 2017 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues verified Verification succeeded
Milestone

Comments

@jens1o
Copy link
Contributor

jens1o commented Jun 23, 2017

  • 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

😢

@vscodebot vscodebot bot added the insiders label Jun 23, 2017
@vscodebot vscodebot bot added bug Issue identified by VS Code Team member as probable bug php PHP support issues labels Jun 23, 2017
@jens1o
Copy link
Contributor Author

jens1o commented Jun 23, 2017

@roblourens You're not meant. This is for @ramya-rao-a

@jens1o jens1o mentioned this issue Jun 23, 2017
15 tasks
@ramya-rao-a
Copy link
Contributor

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

@ramya-rao-a ramya-rao-a added this to the June 2017 milestone Jun 23, 2017
@jens1o
Copy link
Contributor Author

jens1o commented Jun 23, 2017

Yes, I did.

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jun 23, 2017

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)

@ramya-rao-a ramya-rao-a added emmet Emmet related issues and removed php PHP support issues labels Jun 23, 2017
@jens1o
Copy link
Contributor Author

jens1o commented Jun 23, 2017

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

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jun 23, 2017

@jens1o Yes, that is a very valid expectation :)

@roblourens We talked about this yesterday. Do you mind if I create a new issue to track the discussion of having emmet support in the internal php extension?

@ramya-rao-a
Copy link
Contributor

Created #29354 for emmet completion support in php extension

Closing this issue as its no longer applicable now that emmet suggestions are disabled when using emmet.sytnaxProfiles

@ramya-rao-a ramya-rao-a added bug Issue identified by VS Code Team member as probable bug and removed bug Issue identified by VS Code Team member as probable bug labels Jun 26, 2017
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jun 26, 2017

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

@ramya-rao-a ramya-rao-a changed the title Emmet: Writing a php start tag is torture. Emmet suggestions in php file is too noisy Jun 26, 2017
@jrieken
Copy link
Member

jrieken commented Jun 29, 2017

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

@jrieken jrieken reopened this Jun 29, 2017
@jrieken jrieken added the verification-found Issue verification failed label Jun 29, 2017
@ramya-rao-a
Copy link
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

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

ramya-rao-a commented Aug 10, 2017

@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?

@jens1o
Copy link
Contributor Author

jens1o commented Aug 10, 2017

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

@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

No branches or pull requests

4 participants