Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8fcd735

Browse files
committed
Fix up formatting
1 parent c9117ba commit 8fcd735

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/syntax_tree/language_server.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ def capabilities
8686
}
8787
end
8888

89-
def format(source, file_extension)
89+
def format(source, extension)
90+
text = SyntaxTree::HANDLERS[".#{extension}"].format(source, print_width)
91+
9092
{
9193
range: {
9294
start: {
@@ -98,8 +100,7 @@ def format(source, file_extension)
98100
character: 0
99101
}
100102
},
101-
newText:
102-
SyntaxTree::HANDLERS[".#{file_extension}"].format(source, print_width)
103+
newText: text
103104
}
104105
end
105106

0 commit comments

Comments
 (0)