Closed knotbin closed 4 months ago
This should probably only apply to html, xml, and jsx. It should work like this…
<
- no autocomplete occurs<div
- no autocomplete occurs>
, <div>
- closing tag is autocomplete and is inserted directly after the opening tag. Cursor is placed in between tags. Eg. <div>|</div>
<div>
|
</div>
[!NOTE] Tag attributes should be ignored and not put in the closing tag. Eg.
<div class="panel"></div>
In addition to JSX and TSX, it should also apply to regular JS and TS files as JSX and TSX can be written inside regular JS and TS files.
@knotbin absolutely, good point! Would you be willing to take this one on?
Sure @austincondiff!
You rock! Several additional considerations...
<div />
, so we should not autocomplete when this is the case.<div
id="main"
class="wrapper"
>
|
</div>
Description
When a user uses angle brackets with a component, for instance typing
<div>
, and then presses enter, the system autocompletes that component, adding</div>
on the line below the new current line and indents the new current line.Alternatives Considered
No response
Additional Context
No response
Screenshots