microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.63k stars 29.04k forks source link

Emmet suggestions in php file is too noisy #29318

Closed jens1o closed 7 years ago

jens1o commented 7 years ago
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

😢

jens1o commented 7 years ago

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

ramya-rao-a commented 7 years ago

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

jens1o commented 7 years ago

Yes, I did.

ramya-rao-a commented 7 years ago

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)

jens1o commented 7 years ago

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

ramya-rao-a commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

Note to verifier:

jrieken commented 7 years ago

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

ramya-rao-a commented 7 years ago

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 commented 7 years ago

@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 https://github.com/Microsoft/vscode/issues/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 commented 7 years ago

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