Treat Newick and Racket as lisps

pull/492/head
Wilfred Hughes 2023-03-03 00:21:51 +07:00
parent 03985066f5
commit 045d6a2c58
3 changed files with 7 additions and 2 deletions

@ -1,5 +1,10 @@
## 0.45 (unreleased)
### Diffing
Racket and Newick are now treated as lisps for the purposes for
parenthesis heuristics.
### Parsing
Improved parsing for Makefiles.

@ -131,7 +131,7 @@ sample_files/nesting_before.el sample_files/nesting_after.el
9fcf6b8adf148cdae47bc3a5f8068e41 -
sample_files/newick_before.nwk sample_files/newick_after.nwk
4778aef7b901b2cc7f9ad3601f87864d -
2919522e564dad74183ef2411bfc3111 -
sample_files/nix_before.nix sample_files/nix_after.nix
09a56752c1eb7f3f5c10d631a01973fc -

@ -56,7 +56,7 @@ fn prefer_outer_delimiter(language: guess_language::Language) -> bool {
match language {
// For Lisp family languages, we get the best result with the
// outer delimiter.
EmacsLisp | Clojure | CommonLisp | Janet => true,
EmacsLisp | Clojure | CommonLisp | Janet | Racket | Newick => true,
// JSON and TOML are like Lisp: the outer delimiter in an array object
// is the most relevant.
Json | Toml | Hcl => true,