Skip to content

Commit

Permalink
Fixed path issue on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Nimaoth committed Aug 24, 2024
1 parent 44e6804 commit 20df442
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/text/language/lsp_client.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 20df442

Please sign in to comment.