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

HTML tag autocomplete stopped working on JSX files (Code - Insiders) #18427

Closed
rickitan opened this issue Jan 12, 2017 · 21 comments
Closed

HTML tag autocomplete stopped working on JSX files (Code - Insiders) #18427

rickitan opened this issue Jan 12, 2017 · 21 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues verified Verification succeeded
Milestone

Comments

@rickitan
Copy link

  • VSCode Version: Version 1.9.0-insider (1.9.0-insider) | 2017-01-11T07:05:43.066Z
  • OS Version: 10.12.2

I opened this issue #18284 on Monday. I downloaded the nightly build to verify the fix that @aeschli introduced. It did work.

But I found a possible regression. Autocompleting tags in javascriptreact files stopped working:

new-autocomplete-issue

On stable it is working:

autocomplete-working

Thank you for the hard work guys, I'm loving VS Code.

@mjbvz mjbvz added the emmet Emmet related issues label Jan 12, 2017
@aeschli aeschli assigned ramya-rao-a and unassigned aeschli Jan 12, 2017
@aeschli
Copy link
Contributor

aeschli commented Jan 12, 2017

We now have a separate language id for inside react tags: jsx-tags.
The emmet mode should map that to the mode id it uses.

@ramya-rao-a ramya-rao-a added this to the January 2017 milestone Jan 17, 2017
@ramya-rao-a ramya-rao-a added the bug Issue identified by VS Code Team member as probable bug label Jan 17, 2017
@rickitan
Copy link
Author

rickitan commented Jan 18, 2017

I just downloaded the latest nightly build and confirmed the fix. Thank you @ramya-rao-a ! 🎊

@ramya-rao-a ramya-rao-a added the verified Verification succeeded label Jan 25, 2017
@accounthandler
Copy link

seems it happened again. vs code ver: 1.10.2 2017-03-08T13:54:01.558Z
mac os 10.12.2

@ramya-rao-a
Copy link
Contributor

@accounthandler I just tried on 1.10.2, works fine. What is the language mode on your file? You can see it on the bottom right corner

@accounthandler
Copy link

accounthandler commented Mar 13, 2017

@ramya-rao-a
javascript (babel) or javascript react (babel) , neither works. But if I switch to html, then it works.
(the file extension is .js, just a boilerplate file created by create-react-app)

It's also weird to me, since it was working yesterday.

@ramya-rao-a
Copy link
Contributor

As long as the language mode is "Javascript React", it should work

screen shot 2017-03-12 at 9 27 04 pm

Can you share a gif/screenshots of what you are seeing with sample code perhaps?

Was this working for you in 1.10.2 ?

@accounthandler
Copy link

test

It was working. No idea what happened...

@ramya-rao-a
Copy link
Contributor

The language mode "Javascript Babel" are you getting that from an extension?

@accounthandler
Copy link

These are the extensions I installed. Maybe from the first one babel es6/es7. But even after I disable the plugin, the tag autocomplete still doesn't work.

image

@h2df
Copy link

h2df commented Mar 30, 2017

Using highlighter plugin Sublime Babel, this issue occurs too.

@ramya-rao-a
Copy link
Contributor

I installed both the babel and sublime babel extensions

screen shot 2017-04-01 at 11 19 44 pm

And emmet expansions work for me both in .js and .jsx files with language mode as Javascript React (Babel) in the Insiders build but not in the Stable build.

@aeschli Did we change something around this?

@kivohin
Copy link

kivohin commented Aug 7, 2017

Not working for me also on stable version 1.14.2 inside JS and JSX files when using "emmet.useNewEmmet": true. But with "emmet.useNewEmmet": false it works.

However inside HTML files both cases are fine. Has this been fixed yet?

@ramya-rao-a
Copy link
Contributor

@kivohin This is fixed in the latest Insiders. Can you give it a try there?

@luishrd
Copy link

luishrd commented Aug 9, 2017

broken for me on Version 1.14.2

@ramya-rao-a
Copy link
Contributor

VS Code 1.15 will be released soon (mostly tomorrow) in which this should be fixed without any settings change.

@whs465
Copy link

whs465 commented Aug 11, 2017

@ramya-rao-a
Autocompleting tags in javascriptreact files for components is broken for me on VS Code 1.15.
react

@ramya-rao-a
Copy link
Contributor

@whs465 Emmet suggestions will not show up for simple words. We made that decision because other wise you will end up getting a suggestion for every word you type.

We are working on getting tab back for emmet. So for components, that should work. Follow the issue number 32243

And for actual abbreviations like MyComponent.hello>YourCompnenet gets emmet suggestions even today

@lottamus
Copy link

lottamus commented Aug 25, 2017

@CodeLittlePrince

"emmet.includeLanguages": { "javascript", "html" },
add this to your settings.json

I think you meant: "emmet.includeLanguages": { "javascript": "javascriptreact" }

This works for me

@smiled0g
Copy link

I have version 1.15.1, still not fixed

I practically cannot work now. Please suggest what to do.

@ramya-rao-a
Copy link
Contributor

@smiled0g You need to provide more details on what is not working for you. What settings have you set? Which file are you working on? etc.

Please read the Emmet docs

@ziison
Copy link

ziison commented Aug 30, 2017

step 1: the setting emmet.triggerExpansionOnTab and set it to true.
step 2:

"emmet.includeLanguages": {
    "javascript": "javascriptreact",
    "vue-html": "html",
    "plaintext": "jade"
}

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests