From c8fe689858961ec9fc00577f71d139a400c1ce95 Mon Sep 17 00:00:00 2001 From: Dmitriy Mihaylenko Date: Fri, 8 Dec 2023 21:54:23 +0200 Subject: [PATCH] fix crlf text file creation on windows (#449) --- server/features.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/features.v b/server/features.v index 00f22c35..b8400ddd 100644 --- a/server/features.v +++ b/server/features.v @@ -23,7 +23,7 @@ pub fn (mut ls Vls) formatting(params lsp.DocumentFormattingParams, mut wr Respo // To simplify this, we will make a temporary file and feed it into // the v fmt CLI program since there is no cross-platform way to pipe // raw strings directly into v fmt. - mut temp_file := os.open_file(server.temp_formatting_file_path, 'w')! + mut temp_file := os.open_file(server.temp_formatting_file_path, 'wb')! temp_file.write_string(source.string())! temp_file.close() defer {