Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Auto closing of html tags closes the tag with the parent element when both coc-svelte and coc-html are installed #48

Open
salaerts opened this issue Feb 2, 2022 · 1 comment

Comments

@salaerts
Copy link

salaerts commented Feb 2, 2022

If I have both coc-svelte and coc-html loaded, with html.autoClosingTags: true then I get some weird behavior.

Suppose I have this code:

        <dl>
            <dt>Term</dt>
            <dd>Description</dd>
        </dl>

If at this point I add another

after the
element, the auto closure functionality closes the tag with </dl>dt>:

        <dl>
            <dt>Term</dt>
            <dd>Description</dd>
            <dt></dl>dt>
        </dl>

I can reproduce this with any HTML element.

If I only install coc-html, the auto closing feature works as expected. When I only use coc-svelte I have no auto close functionality.
Not sure if this is the correct repo to report this issue.

Setting html.autoClosingTags to false acts as a workaround but of course disables auto closure entirely.

@petergarnaes
Copy link

You can set svelte.plugin.html.completions.enable to true, and this will enable you to have auto closing tags for .svelte files without using coc-html.

You can then maybe disable coc-html for svelte files and have it work correctly?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants