Skip to content

Commit

Permalink
Set the correct indentation when using the maybe expression. (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucavallerini authored Jan 20, 2024
1 parent 2a401d1 commit 831e542
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
// Indent if a line ends brackets, "->" or most keywords. Also if prefixed
// with "||". This should work with most formatting models.
// The ((?!%).)* is to ensure this doesn't match inside comments.
"increaseIndentPattern": "^((?!%).)*([{([]|->|after|begin|case|catch|fun|if|of|try|when|(\\|\\|.*))\\s*$",
"increaseIndentPattern": "^((?!%).)*([{([]|->|after|begin|case|catch|fun|if|of|try|when|maybe|else|(\\|\\|.*))\\s*$",
// Dedent after brackets, end or lone "->". The latter happens in a spec
// with indented types, typically after "when". Only do this if it's _only_
// preceded by whitespace.
"decreaseIndentPattern": "^\\s*([)}\\]]|end|->\\s*$)",
"decreaseIndentPattern": "^\\s*([)}\\]]|end|else|->\\s*$)",
// Indent if after an incomplete map association operator, list
// comprehension and type specifier. But only once, then return to the
// previous indent.
Expand Down

0 comments on commit 831e542

Please sign in to comment.