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] don't show closing element proposal as first entry if element is already closed later #145883

Open
isidorn opened this issue Mar 23, 2022 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality html HTML support issues
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Mar 23, 2022

Have the following html content

<header>
	<
</header>

Let the cursor be on the second line, as soon as you type < suggest widget shows and /header is the first suggestion.
I would not expect /header to be offered here since that tag is already closed.

fyi @keford

@aeschli
Copy link
Contributor

aeschli commented Mar 23, 2022

I see your point.

  • it's just a proposal. It's up to the user to decide whether it makes sense to pick that proposal.
  • closing an element that is closed later makes more sense when doing it for common elements like <span> and <div>
  • the completion list is not super useful when just typing <. It contains all elements. Only when typing the next characters the list filters down to better proposals.

+1 for sorting it lower if we find out that the element is already closed later in the file. We currently don't look after the current completion position.

@aeschli aeschli added the feature-request Request for new features or functionality label Mar 23, 2022
@aeschli aeschli added this to the Backlog milestone Mar 23, 2022
@aeschli aeschli changed the title Closing tag suggested too aggressively in HTML [html] don't show closing element proposal as first entry if element is already closed later Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality html HTML support issues
Projects
None yet
Development

No branches or pull requests

2 participants