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

typescript - don't autoclose type arguments #181

Closed
oldo opened this issue Jun 14, 2020 · 7 comments
Closed

typescript - don't autoclose type arguments #181

oldo opened this issue Jun 14, 2020 · 7 comments

Comments

@oldo
Copy link

oldo commented Jun 14, 2020

When using this extension in Typescript files, type arguments are detected as HTML and autoclosed, which means that I have to manually delete the erroneously created tag.

2020-06-14 12 07 50

I know that I could disable the extension on .ts and .tsx files, however the autoclosing functionality is still useful in these files when working on React project.

Is there a way that the extension can detect when the tags being created are TS type arguments and not autoclose in this situation?

@mwisnicki
Copy link

See #24 how to cope but this should really be working out of the box as it's super annoying in most popular languages.

@formulahendry Is there any good reason why default activation list is not limited to markup based languages?

@JulioC
Copy link

JulioC commented Aug 8, 2020

The solution on #24 totally disables autoclose on tsx, which is not the desirable behavior.

Would it be possible to use some language context to decide when to close a tag or not?

@mwisnicki
Copy link

I believe a proper solution to that problem is tracked in microsoft/vscode#1751 but perhaps some hack could be implemented in the meantime.

@tusharsadhwani
Copy link

Bump, hope this can be fixed soon.

@tusharsadhwani
Copy link

Okay, the fix for me was that vscode has builtin support for auto closing tags. Just got rid of this extension.

P.S. auto rename is also builtin now, both of these plugins are obsolete i guess 🙃

@JulioC
Copy link

JulioC commented Sep 11, 2020

Adding to @tusharsadhwani update:

There's a VSCode settings called editor.renameOnType, which rename the matching close tag as you type. It only works on HTML at this point. There is an open issue for supporting other languages: microsoft/vscode#94316

The auto closing feature is done using html.autoClosingTags, typescript.autoClosingTags or javascript.autoClosingTags

This does make the plugin obsolete for me, and solve the original issue. Thanks for pointing that out!

@oldo
Copy link
Author

oldo commented Sep 12, 2020

Thanks @tusharsadhwani & @JulioC
Issue is resolved by your suggestions.

Thank you @formulahendry for developing the extension which has been useful to me over the past couple of years 👍

@oldo oldo closed this as completed Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants