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

Place open brace on new line after function stopped working #502

Closed
endasil opened this issue Oct 2, 2015 · 4 comments
Closed

Place open brace on new line after function stopped working #502

endasil opened this issue Oct 2, 2015 · 4 comments

Comments

@endasil
Copy link

endasil commented Oct 2, 2015

In Tools -> Options -> Node.js -> Formatting -> Braces i have "Place open brace on new line after function" and "Place open brace on new line for control blocks " checked.

If i have a function like this:
function SuperDuperFunction()
{

}

Then go to edit format selection / document, it will move the opening bracket to the same line.

function SuperDuperFunction() {

}

Any idea what causes this or how i can work around it?

@mousetraps
Copy link
Contributor

hrm... I can't seem to reproduce... What's the build action of the file set to? If it's set to "Compile", then the Node.js formatting settings will kick in. But if it's set to "Content", the JavaScript formatting settings will kick in and you'll have the select the proper setting there too.

See #67 for more info, but this is one of the unfortunate results of having separate language services for Node.js / JavaScript.

@endasil
Copy link
Author

endasil commented Oct 8, 2015

The build action is set set to Compile. I tried setting javascript formatting to "Place open brace on new line after function" too. Tried changing between Compile and content, unchecking and checking braces on new line but nothing seems to change. Do you have any other troubleshooting advice?

@mousetraps mousetraps modified the milestone: Future Oct 21, 2015
@mjbvz
Copy link
Contributor

mjbvz commented Apr 13, 2016

I can't repo this with NTVS 1.2 alpha on either Full Intellisense or Es6 Preview Intellisense.

Please reopen and provide additional details if you are still running into the problem.

Thanks.

@mjbvz mjbvz closed this as completed Apr 13, 2016
@Timwi
Copy link

Timwi commented Jun 25, 2017

@mjbvz @mousetraps

I am having this issue as well, but with no relation to node.js. I have a JavaScript file marked as “Content” (not “Compile”) and the setting is not respected:

https://i.imgur.com/BPYxCDh.png

Please reopen this issue and move it to somewhere not node.js-specific.

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