Improve formatter on long-lines, in particular bin-ops.

This commit is contained in:
KtorZ
2024-08-06 17:29:00 +02:00
parent 91e0e2493a
commit 9d8fdf787c
21 changed files with 364 additions and 50 deletions

View File

@@ -556,7 +556,7 @@ impl DocTypeConstructor {
DocTypeConstructor {
definition: format::Formatter::new()
.docs_record_constructor(constructor)
.to_pretty_string(80),
.to_pretty_string(format::MAX_COLUMNS),
documentation: constructor
.doc
.as_deref()

View File

@@ -37,7 +37,7 @@ use aiken_lang::{
},
builtins,
expr::UntypedExpr,
format::{Formatter, DOCS_MAX_COLUMNS},
format::{Formatter, MAX_COLUMNS},
gen_uplc::CodeGenerator,
line_numbers::LineNumbers,
plutus_version::PlutusVersion,
@@ -676,7 +676,7 @@ where
name: ast::CONFIG_MODULE.to_string(),
code: Formatter::new()
.definitions(&defs[..])
.to_pretty_string(DOCS_MAX_COLUMNS),
.to_pretty_string(MAX_COLUMNS),
},
&root,
ModuleKind::Config,