class Standard::Lsp::Routes

def format_file(file_uri)

def format_file(file_uri)
  text = @text_cache[file_uri]
  if text.nil?
    @logger.puts "Format request arrived before text synchonized; skipping: `#{file_uri}'"
    []
  else
    new_text = @standardizer.format(uri_to_path(file_uri), text)
    if new_text == text
      []
    else
      [{
        newText: new_text,
        range: {
          start: {line: 0, character: 0},
          end: {line: text.count("\n") + 1, character: 0}
        }
      }]
    end
  end
end