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

HTML should not suggest invalid tags #18

Open
bradymadden97 opened this issue Feb 21, 2023 · 3 comments
Open

HTML should not suggest invalid tags #18

bradymadden97 opened this issue Feb 21, 2023 · 3 comments

Comments

@bradymadden97
Copy link

See below video for examples. The plugin currently suggests invalid HTML tags, and seems to just match any given string. In VSCode, it does not do this. It only suggests Emmet Autocomplete when there is a valid HTML tag.

CodeMirror:

Screen.Recording.2023-02-21.at.5.09.43.PM.mov

VSCode:

Screen.Recording.2023-02-21.at.5.10.01.PM.mov
@sergeche
Copy link
Member

In terms of Emmet, there's no such thing as valid/invalid HTML tag. It can expand any word into tag, which could be custom XML or component tag in Vue/Angular/Svelte/JSX.

That's why it doesn't suggest anything as autocomplete in CM6, it only adds subtle hint that given word can be expanded. You can disable this hint or change it with CSS

@bradymadden97
Copy link
Author

That makes sense, but is there a reason VSCode behaves differently?

The CM plugin API doesn't seem to allow us to see potential expansions and perform further filtering to only display UI elements when those suggestions make sense.

@sergeche
Copy link
Member

VSCode has it’s own implementation of Emmet UX, which is not not exactly as it expected to work.

And I’m not sure what you mean by potential expansions and UI filtering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants