windwp / nvim-ts-autotag

Use treesitter to auto close and auto rename html tag
MIT License
1.63k stars 87 forks source link

Auto indent for all possible tags? #69

Closed lutalli closed 1 year ago

lutalli commented 2 years ago

Hi,

This plugin is working pretty well for me, but I wonder if I can enable auto indent not only for standard HTML tags (like <body>, <li>, <div>, etc.), but also for custom tags (like <blablabla>, <test>, <foo>, etc.), after inserting a new line between two already auto paired tags (either by pressing <CR> or by typing another >). So auto indent for all tags.

Example:

If we are writing standard HTML tags such as <body>, it works fine - After pressing <CR> or > with the scene

<body>|</body>

(where | indicates the cursor position), we get

<body>
    |
</body>

As it gets indented properly. But if we are using custom tags instead of standard ones, like <foo>, there won't be any indent there - namely, for the input

<foo>|</foo>

we get

<foo>
|
</foo>

But what I am expecting is

<foo>
    |
</foo>

Is there a way to configure for this? Thanks!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.