From 20df442fca30d1dd39a443537f3531ad8fc8254b Mon Sep 17 00:00:00 2001 From: Nimaoth Date: Sat, 24 Aug 2024 14:32:15 +0200 Subject: [PATCH] Fixed path issue on linux --- src/text/language/lsp_client.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/text/language/lsp_client.nim b/src/text/language/lsp_client.nim index 7c8ec22c..5f7cb740 100644 --- a/src/text/language/lsp_client.nim +++ b/src/text/language/lsp_client.nim @@ -244,7 +244,10 @@ when defined(js): proc absolutePath(path: string): string = path proc toUri*(path: string): Uri = - return parseUri("file:///" & path.absolutePath.encodePathUri) # todo: use file://{} for linux + when defined(linux): + return parseUri("file://" & path.absolutePath.encodePathUri) + else: + return parseUri("file:///" & path.absolutePath.encodePathUri) proc createHeader*(contentLength: int): string = let header = fmt"Content-Length: {contentLength}" & "\r\n\r\n"