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

Tag autocompletion inside of template does not seem right (different from regular HTML files) #2152

Closed
3 tasks done
basuneko opened this issue Aug 13, 2020 · 1 comment
Closed
3 tasks done

Comments

@basuneko
Copy link

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: MacOS
  • Vetur version: v0.26.1
  • VS Code version: 1.47.3
  • VSCode settings have been completely reset
  • No other extensions installed

Problem

Hi. The title might be a bit confusing, apologies for that.

When I type out a new opening tag, I expect a matching closing tag to be added. This does not happen.

In addition, when adding a tag inside of a tag of the same name (i.e. div inside of div), the only suggestion provided converts my new tag into a closing tag for the parent and I end up with

<div>
</div>
</div>

instead of

<div>
  <div></div>
</div>

So far I've tried setting html formatter to none but that had no affect. I couldn't find any other relevant options.
Editing regular html files works quite differently - gif below.

Reproducible Case

Case 1

  1. Inside of the template, type <div
  2. Type the >

Expected: it should create <div></div> and put the cursor between the tags
Actual: suggestions disappear and nothing happens

vetur-case-1

Case 2: Nested divs

  1. Create a div and put the cursor inside of it:
  2. Add a new opening <div>

Expected: The top suggestion should be to create a new <div></div> pair
Actual: The only suggestion is to close the parent tag. Need to press escape to dismiss suggestions.

vetur-case-2

For comparison, this is how it works in an html file:

vetur-html-comparison

@octref
Copy link
Member

octref commented Aug 14, 2020

Part of #565.

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

No branches or pull requests

3 participants