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

No Auto Brace Completion with ES6 IntelliSense #1142

Closed
jackalsin opened this issue Jul 15, 2016 · 18 comments
Closed

No Auto Brace Completion with ES6 IntelliSense #1142

jackalsin opened this issue Jul 15, 2016 · 18 comments

Comments

@jackalsin
Copy link

jackalsin commented Jul 15, 2016

First, thanks for your work
My question is how to make auto brace completion work.
Is that possible for you to review this post ?

copy from the post

is the Automatic Brace Completion really working?

It seems so according to the following youtube link:

            https://www.youtube.com/watch?v=ct4oW_cRMMw 

            at 02:10, and 

            https://www.youtube.com/watch?v=S5pXzp2PePw

            at 17:50

but I definitely check the box in Option->TextEditor->JavaScript->Automatic Brace Completion

I installed node js tool: NTVS.1.2.RC.VS.2015

Using VS 2015 Community under windows 10

Test this feature by creating an Express application and a blank javascript visual

And I have reinstalled the VS already... and this feature in C++ and C# are working

is there any trick I missed ?

I really really really need this feature. This is the only flaw so far to develop a javascript program in VS

Please help
--------- end of the post --------------------

BTW, i notice Sara in the presentation video can do something like auto complete member in function like the video at 01:00 in the link

@mjbvz mjbvz added the external label Jul 15, 2016
@mjbvz
Copy link
Contributor

mjbvz commented Jul 15, 2016

Thanks for the report. I've confirmed this is an issue but it appears to be a Typescript problem: microsoft/TypeScript#1484 We use Typescript to power our modern IntelliSense experience and it looks like they will only start supporting automatic brace completion with Typescript 2.0.

I confirmed this is the root cause by switching from our Typescript powered editor/intellisense to our old static analysis engine powered ES5 intellisense: Tools -> Options then Text Editor -> Node.js -> IntelliSense. This restores automatic brace completion, however I strong recommend against doing this because there are a number of other benefits to the new Typescript IntelliSense experience.

@mjbvz mjbvz changed the title Auto Brace Completion No Auto Brace Completion with ES6 IntelliSense Jul 15, 2016
@mjbvz mjbvz added the editor label Jul 15, 2016
@jackalsin
Copy link
Author

jackalsin commented Jul 15, 2016

May I ask how Sara did something like in the video at 1:00 ?

@mjbvz
Copy link
Contributor

mjbvz commented Jul 15, 2016

The video was on an older version of NTVS so the behavior in 1.2 will be somewhat different. What specifically did you notice in the video? The part where it autocompletes the entire function instead of just the function keyword, or how she was able to fill in the function name?

@jackalsin
Copy link
Author

jackalsin commented Jul 15, 2016

Sorry for my English, I mean complete the entire function

@mjbvz
Copy link
Contributor

mjbvz commented Jul 15, 2016

With old, ES5 IntelliSense, you could do that by entering function and then pressing tab. That is no longer supported by Typescript to my knowledge.

@jackalsin
Copy link
Author

Thank you,

Have a nice weekend~

@vEduardovich
Copy link

I am waiting to fix this problem, too.

@mjbvz
Copy link
Contributor

mjbvz commented Jul 27, 2016

Typescript 2.0 should resolve this. Try downloading the beta for VS2015 and checking the brace completion works as expected. You may have to manually enable the option back completion option again for Node.js to get it working.

@plushy1anthony999
Copy link

plushy1anthony999 commented Aug 13, 2016

You may have to manually enable the option back completion option again for Node.js to get it working.

Could you elaborate on what you mean here? Also, were you able to get brace completion after downloading the typescript 2.0 beta for VS2015? I've installed it, but still don't have brace completion.

@jackalsin
Copy link
Author

Yeah. After this post, I tried the beta version, still not working.

@vEduardovich
Copy link

vEduardovich commented Aug 15, 2016

So do I. I installed TypeScript 2.0 Beta, even Typings by NPM first && plugin second. But Anythings did not work.

It's very annoying that changing version EcmaScrpit6 to EcmaScript5 for just automatic brace completion. And EcmaScript5 is not support new grammars such as arrow function, back ticks something like that. So I couldn't use auto indenting. It's in a dilemma.

@mjbvz
Copy link
Contributor

mjbvz commented Aug 15, 2016

Yes, I didn't realize that for VS15, this change is in TS 2.0.1: microsoft/TypeScript#9634, not the 2.0 beta. I'm not sure when that will become publicly available but will follow up with the TS team to make sure this is being addressed as soon as possible.

@mjbvz
Copy link
Contributor

mjbvz commented Aug 18, 2016

Quick update: still working with the Typescript team to coordinate this feature in VS2015. There is unfortunately no easy to for you to try this out in VS2015 at the moment.

To get brace completion today, you can try NTVS on the VS15 preview which should have brace completion enabled.

@vEduardovich
Copy link

I just moved to VS Code. It's super better than VS2015. Thank you.

@mjbvz
Copy link
Contributor

mjbvz commented Sep 7, 2016

This has been fixed by TypeScript 2.0 RC.

autobrace

To enable automatic brace completion:

  1. Install TypeScript 2.0RC on VS 2015 Update 3 or higher.
  2. Open VS and go to Tools -> Options and then Text Editor -> Node.js -> General and select Automatic brace completion (If this is still not working, try enabling the same option in Text Editor -> Typescript -> General as well)

Brace completion should now be enabled for {, [, (, ", ', <backtick>, and < (That last one is kind of odd actually for non jsx files, I'll check with typescript to make sure it is intended.)

Please let me know if you cannot get this to work still or have any feedback or suggestions on the feature.

Thanks.

@jackalsin
Copy link
Author

PLase don't close too fast. In my end, it's still not working

I am pretty sure I installed update 3 and I can see my TypeScript -> General -> automatic brace competion is gray

@jackalsin
Copy link
Author

God, how hard is it. Just a stack!

@mjbvz
Copy link
Contributor

mjbvz commented Sep 19, 2016

@jackalsin Did you install TypeScript 2.0 RC? That's the fix that added support for brace completion.

We made the decision not to implement this feature on the NTVS side but instead pick it up from TypeScript because we want a consistent experience when editing JS and TS files across Visual Studio. This is the same reason we dropped our old IntelliSense engine in favor one powered by TypeScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants