简体   繁体   中英

Visual Studio 2017 JS Editor weird behaviour when pressing enter

I'm currently struggling with Visual Studio 2017 JavaScript editor due to it's following behavior - when I have lines such as

var r = { headers: {} }, | control = new _hxControl(x);

I put my cursor to where | is and press enter to format the var to its own line, VS just cuts off the first character of my variable name and the result is

    var r = { headers: {} },
        ontrol = new _hxControl(x);

has anybody ran into this issue, too? and found a way to turn off this behavior?

I have found the answer. This behavior occurs when a Language Service is disabled via Options > Text editor > JS > Language Service

I re-enabled the language service and the issue is gone. The reason behind disabling was that I find the new JS Language Service to be quite annoying, but I guess I'll have to bite it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM