Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webstorm turn off new spaces in anonymous function declaration

e.g. I have this:

exports.getsertHexId = function (table, hex) {

Webstorm 8's auto-indent is creating the space between the keyword function and the open paren (.

Its settings spaces options cover:

  • Function declaration parentheses
  • Function call parentheses
  • 'if' parentheses
  • . . .

Confused since this should be covered under function declaration parentheses I thought. Can this be properly configured? Is it a bug?

like image 701
djechlin Avatar asked Apr 04 '14 16:04

djechlin


1 Answers

Scroll down further and it's the option "In function expression." Because function() { ... } is an expression which returns a value, that value being a function.

enter image description here

like image 145
djechlin Avatar answered Sep 28 '22 18:09

djechlin