diff --git a/modules/language-server/src/main/java/nextflow/lsp/services/script/ScriptFormattingProvider.java b/modules/language-server/src/main/java/nextflow/lsp/services/script/ScriptFormattingProvider.java index 6606eb3..82b3b2c 100644 --- a/modules/language-server/src/main/java/nextflow/lsp/services/script/ScriptFormattingProvider.java +++ b/modules/language-server/src/main/java/nextflow/lsp/services/script/ScriptFormattingProvider.java @@ -88,7 +88,7 @@ public List formatting(URI uri, FormattingOptions options) { } var range = new Range(new Position(0, 0), Positions.getPosition(oldText, oldText.length())); - var visitor = new Visitor(sourceUnit, options, ast); + var visitor = new Visitor(sourceUnit, options); visitor.visit(); var newText = visitor.toString(); @@ -101,16 +101,13 @@ private static class Visitor extends ScriptVisitorSupport { private FormattingOptions options; - private ScriptAstCache ast; - private Formatter fmt; private int maxIncludeWidth = 0; - public Visitor(SourceUnit sourceUnit, FormattingOptions options, ScriptAstCache ast) { + public Visitor(SourceUnit sourceUnit, FormattingOptions options) { this.sourceUnit = sourceUnit; this.options = options; - this.ast = ast; this.fmt = new Formatter(options); }