Emmet suggestions should only appear in JSX/TSX markup contexts
Open
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Hi.
When editing .jsx or .tsx files, Emmet suggestions can appear while writing regular JavaScript/TypeScript code, even when the cursor is not inside JSX markup.
For example:
const div = ...
const variable = ...
import div from "..."
Emmet suggestions may still appear for these identifiers.
Expected behavior
Emmet should be available when writing JSX/TSX markup, for example:
return (
div
)
or:
div
but should not appear while writing normal JavaScript/TypeScript code outside JSX.
Why this matters
In React projects, Emmet suggestions can become noisy and interfere with normal JavaScript/TypeScript IntelliSense, especially when common identifiers happen to match Emmet abbreviations.
Ideally, Emmet should be context-aware and only provide suggestions when the cursor is actually in a JSX/TSX markup context.
Contributor guide
Assessment
This issue has not been assessed yet.