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

Snippets don't work in jxs tag #45

Closed
gespispace opened this issue Mar 6, 2019 · 9 comments
Closed

Snippets don't work in jxs tag #45

gespispace opened this issue Mar 6, 2019 · 9 comments

Comments

@gespispace
Copy link

  • VSCode Version: 1.31.1
  • OS Version: Linux x64 4.15.0-45-generic
  • Babel JavaScript: 0.0.20

I want use ES7 React/Redux/GraphQL/React-Native snippets in jsx tag they don't offered if i turn off the extension offered
I find comment with the problem in vscode
#33723

@michaelgmcd
Copy link
Owner

This is a little unclear. The comment you've linked refers to other Babel projects. Are you saying it happens for this one as well?

@gespispace
Copy link
Author

Yes, if i turn on this extensions my snippet don't work. And the comment say that work with other Babel projects.

@michaelgmcd
Copy link
Owner

Does this solution work for you? I was able to install the extension you listed and get it working with "editor.snippetSuggestions": "top" set in my settings.

@gespispace
Copy link
Author

Sorry for the late reply.

Yes, this solution work. But i want see Snippets in suggests.

@phoydar
Copy link

phoydar commented Aug 15, 2019

  • Vscode Version: 1.37.0
  • Mac OS 10.14.6
  • Plugin version 0.0.23

I'm also experiencing an issue with not seeing common JS snippets inside of JSX. the default js log snippet trigger no longer works and doesn't show up in the Vscode intellisense list when I enable the plugin.

Extension disabled. Outside JSX (Works as expected)
image

Extension disabled. Inside JSX (Works as expected)
image

Extension enabled. Outside JSX (Works as expected)
image

Extension enabled. Inside JSX (Does not work as expected)
The intellisense list no longer contains the default log snippet and doesn't show any user JS snippets.
image

@exocode
Copy link

exocode commented Feb 13, 2020

I also found out, that at some places the snippets are working and some are not:
See here, very curious.
I hope this video will help:

2020-02-13 12 13 56

@michaelgmcd
Copy link
Owner

Thanks for the in depth video @exocode. I'll take a look at this when I can.

@exocode
Copy link

exocode commented Feb 13, 2020

Thanks for the in depth video @exocode. I'll take a look at this when I can.

Good luck :-)

@michaelgmcd
Copy link
Owner

@exocode The issue here is that VSCode Language Babel adds two new languages for JSX and JSX Attributes (for several reasons). These snippets need to be applied for those languages as well to be available in JSX. I've created a PR to the repo you referenced to add support. Unfortunately, this will need to be done for any snippet projects. Could be some of your chances to contribute to open source!

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