File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def run
5656 store . delete ( uri )
5757 in { method : "textDocument/formatting" , id :, params : { textDocument : { uri : } } }
5858 contents = store [ uri ]
59- write ( id : id , result : contents ? [ format ( store [ uri ] ) ] : nil )
59+ write ( id : id , result : contents ? [ format ( store [ uri ] , uri . split ( "." ) . last ) ] : nil )
6060 in { method : "textDocument/inlayHint" , id :, params : { textDocument : { uri : } } }
6161 contents = store [ uri ]
6262 write ( id : id , result : contents ? inlay_hints ( store [ uri ] ) : nil )
@@ -86,7 +86,7 @@ def capabilities
8686 }
8787 end
8888
89- def format ( source )
89+ def format ( source , file_extension )
9090 {
9191 range : {
9292 start : {
@@ -98,7 +98,7 @@ def format(source)
9898 character : 0
9999 }
100100 } ,
101- newText : SyntaxTree . format ( source , print_width )
101+ newText : SyntaxTree :: HANDLERS [ ". #{ file_extension } " ] . format ( source , print_width )
102102 }
103103 end
104104
You can’t perform that action at this time.
0 commit comments