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

Autocompletion Incorrectly Expands Self-Closing Tags in React JSX #124

Closed
Innei opened this issue Jul 17, 2023 · 13 comments
Closed

Autocompletion Incorrectly Expands Self-Closing Tags in React JSX #124

Innei opened this issue Jul 17, 2023 · 13 comments
Labels
wontfix This will not be worked on

Comments

@Innei
Copy link

Innei commented Jul 17, 2023

Hello,

I'm experiencing an issue with the nvim-ts-autotag plugin where the autocompletion feature is not correctly expanding self-closing tags.

Current Behavior:

When I type <Img /, the plugin automatically completes it as <Img /Img>, which is not the expected behavior.

Expected Behavior:

The expected behavior is for the plugin to complete the tag as <Img />.

Steps to Reproduce:

Open a .jsx or .tsx file.
Start typing a self-closing tag, for example: <Img /.
The plugin incorrectly autocompletes the tag as <Img /Img>.

Env

    ● nvim-ts-autotag 1.29ms  start
        dir    /Users/innei/.local/share/nvim/lazy/nvim-ts-autotag
        url    https://github.com/windwp/nvim-ts-autotag
        branch main
        commit 6be1192
        readme README.md

@2Senn
Copy link

2Senn commented Jul 18, 2023

Having the same issue. Any fix?

@nomnivore
Copy link

I'm also facing this problem. I think that conditionally turning off the close_on_slash feature while inside of a tag element should suffice.

@2Senn
Copy link

2Senn commented Jul 20, 2023

That kinda solves the problem but it sorta created a new issue. The functionality for closing tags like:

<NavigationStack.Navigator>

broke. Basically it does not create a closed tag for it anymore which is sadge.

@doganalper
Copy link

@2Senn I haven't turned off close_on_slash feature yet and I'm facing issue you mentioned above. I don't think turning off that feature caused it.

@gonstoll
Copy link

Getting the same here 😔 turning off close_on_slash works as a temporary fix. Hope this gets sorted out soon!

@andelkocvjetkovic
Copy link

I'm having the same issues.

@AnthonyDugarte
Copy link

Having the same issues.

@alevor657
Copy link

Same issues here

@kuator
Copy link

kuator commented Nov 14, 2023

Same issue

@kuator
Copy link

kuator commented Nov 14, 2023

Alternative solution: aca/emmet-ls#69

@drew-harris
Copy link

Also having the same issue. Feels like it started happening out of no where

@sajadspeed
Copy link

Same here.

Ax51 added a commit to Ax51/nvim_config that referenced this issue Feb 7, 2024
Temporary fix for autoclosing React tags. For more info please refer to this link:
windwp/nvim-ts-autotag#124
Copy link

stale bot commented Feb 10, 2024

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.

@stale stale bot added the wontfix This will not be worked on label Feb 10, 2024
@stale stale bot closed this as completed Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests