From 517213b4c6c175dc318fe81f5be86533c1407bf4 Mon Sep 17 00:00:00 2001 From: Nimaoth Date: Sun, 10 Mar 2024 19:20:34 +0100 Subject: [PATCH] fixed issue with path --- src/servers/languages_server.nim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/servers/languages_server.nim b/src/servers/languages_server.nim index 536aec21..0bb121b6 100644 --- a/src/servers/languages_server.nim +++ b/src/servers/languages_server.nim @@ -1,7 +1,9 @@ import std/[os, osproc, asynchttpserver, strutils, strformat, uri, asyncfile, json, sequtils] -import misc/[custom_async, util, myjsonutils] +import misc/[custom_async, util, myjsonutils, custom_logger] import router, server_utils +logCategory "languages-server" + var processes: seq[Process] = @[] proc callback(req: Request): Future[void] {.async.} = @@ -29,10 +31,11 @@ proc callback(req: Request): Future[void] {.async.} = let reqBody = parseJson(req.body) let executablePath = reqBody["path"].str let additionalArgs = reqBody["args"].jsonTo seq[string] - let proxyPath = getCurrentDir() / "tools/lsp-ws.exe" + let proxyPath = getAppDir() / "lsp-ws.exe" let directories = hostedFolders.mapIt(fmt"{it.path}").join(";") let args = @[fmt"--port:{port}", fmt"--exe:{executablePath}", fmt"--log:lsp-ws-{port}.log", fmt"--workspace:{workspaceName}", fmt"--directories:{directories}", "--"] & additionalArgs + log lvlInfo, fmt"Starting language server process {proxyPath} with args '{args}'" let process = startProcess(proxyPath, args=args, options={poUsePath, poDaemon}) {.gcsafe.}: