julia-vscode / DocumentFormat.jl

Auto-formatter for Julia
Other
62 stars 18 forks source link

What are valid value of `IndentEXPR`? #19

Closed ice1000 closed 2 years ago

ice1000 commented 6 years ago

The doc says,

  Example of a setting file:

  # JuliaCorpConfig
  IndentWidth = 3
  UseTab = true
  TabWidth = 4
  AlignAfterOpenBracket = Align

  All the available settings and corresponding possible values (default value in bold):

    •    AlignAfterOpenBracket : Align, AlwaysBreak, DontAlign
    •    IndentEXPR : DataType[CSTParser.Begin, CSTParser.Quote, 
     CSTParser.For, CSTParser.While, CSTParser.FunctionDef, CSTParser.Macro,
     CSTParser.Struct, CSTParser.Let, CSTParser.Try, CSTParser.If, CSTParser.Mutable]
    •    IndentWidth : 4
    •    KW_WS : true
    •    NewLineEOF : false
    •    No_WS_OP_group : [8, 13, 14, 16]
    •    No_WS_OP_indv : Any[]
    •    StripLineEnds : false
    •    TabWidth : 4
    •    UseTab : false

But IndentEXPR is an array of expressions. Should I write

IndentEXPR = [CSTParser.Let, CSTParser.Quote]

or

IndentEXPR = CSTParser.Let, CSTParser.Quote

or I can only select one EXPR?

The usage is also not shown in the examples.

ice1000 commented 2 years ago

Closed without explanation? 🤔

davidanthoff commented 2 years ago

DocumentFormat is now just a wrapper around JuliaFormatter.jl that we use for some internal stuff.

ice1000 commented 2 years ago

Ok good

ice1000 commented 2 years ago

Thanks for your explanation