Skip to content

Repository files navigation

Basic Guidelines for formatter

1. Basic idea

  1. Line ends with {, [, ( :
    a. opening bracket to separate line
    b. indentLevel++

  2. Line ends with }, ], ) :
    a. closing bracket to separate line
    a. next line should be un-indented
    b. indentLevel--

  3. Line begins with {, [, ( :
    a. next line should be indented
    b. indentLevel++

  4. Line begins with }, ], ):
    a. indentLevel--

test string:

remote function getUser(id){
  var user = {};
  user.id=id;
  user.name = "Test User";
  return user;}

above becomes:

remote function getUser(id)
{
  var user = {};
  user.id=id;
  user.name = "Test User";
  return user; 
}

About

VSCode extension for auto-formatting .cfc and .cfm (CFML) files.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages