-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Close Tags (again?) #335
Comments
seems to still be broken |
We should think about better native html syntax support. Possible changes will looks like |
Try https://github.com/borela/naomi it had close tags issues too but it was fixed in the latest release. |
I installed naomi and it doesn't autoclose tags either. Has the problem for babel been solved? |
JS Custom auto-closes tags. It also hooks into the standard “Close Tag” command to provide JSX-specific functionality in that case. |
@mileung It does close on my machine, have you restarted sublime after installing it? |
@borela Yes. I installed babel sublime, set babel as my syntax, restart Sublime, and tag autoclosing still does not work. |
@mileung Naomi replaces babel sublime completely, you have to set the syntax to |
@borela Whoops, forgot the context. Same thing happens when I do those steps for Naomi (and uninstall babel). |
@mileung Do you have a sample code to reproduce the problem? What's your sublime's current configuration? |
@borela with naomi > javascript set as my syntax, completing the first tag in |
@mileung Now I understand what you mean, that behavior only occur for HTML because it contains snippets to do it while for JSX, naomi relies on the standard behavior and completes the tag when you type I'll send a patch to fix it soon. |
I have yet to see this work. In fact I was surprised to read that this feature even exists. According to package-metadata.json I am running babel-sublime 8.6.3(?). It might conflict with a setting or something (I've worked hard to get rid of some horrendous snippets) but the Auto Close HTML tags package works just fine for standard html. |
First thanks for the project and your works
|
Can you post an example where the new version will not correctly close tags? I didn't expect that there would be any difference between the versions. The keymap entry looks correct. I see it's just the one from Default with JSX added. The |
Removing the Here are a couple examples that are not working. This one is assigning a variable:
This one is simply in the return for a basic functional component:
|
I'm also having the same problem recently as the above. Used to work with the binding @wwayne posted. |
Have you tried JS Custom, by any chance? I wrote a special close tag command for that which works better than core's for JSX. It might be worth porting to babel-sublime. It might also be possible to slightly change JSX scoping to make the built-in close tag command work better. I'd have to work through the code for the core command. |
I was investigating this a bit and found out that the autoclose command works in certain situations, but not when a closing tag is open. Not sure what is causing the close functionality to fail in that particular scenario, but given that, you should be able to set up a workaround. This snippet attempts to close on
You could change it so tags autoclose on double slash (i.e. effectively typing
The equivalent flow would be: |
FYI, I found that a recent change to JSX scopes broke JS Custom's |
still having this issue myself. Seems |
I think I'm probably going to port JS Custom's custom close tag command to this package. First, though, I should probably write a test suite for it. |
@cvince I'm working on a test suite for JS Custom's close tag command. Do you have any specific examples of cases where the built-in close tag command fails? I'd like to add those to the test suite. |
@Thom1729 Sorry for the super late response. Basically every tag fails (ex: |
Same as #202
<div></ (here not closing like html)
The text was updated successfully, but these errors were encountered: