diff options
-rw-r--r-- | .vscode/launch.json | 4 | ||||
-rw-r--r-- | server/src/uri.lua | 2 | ||||
-rw-r--r-- | server/test.lua | 1 | ||||
-rw-r--r-- | server/test/crossfile/hover.lua | 2 |
4 files changed, 2 insertions, 7 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json index 1eec0c44..63c90816 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,6 @@ "request": "launch", "stopOnEntry": false, "program": "${workspaceRoot}/server/test.lua", - "cwd": "${workspaceRoot}/server", //"luaexe": "${workspaceRoot}\\server\\bin\\lua-language-server.exe", //"luadll": "${workspaceRoot}\\server\\bin\\lua54.dll", "arg": [ @@ -53,11 +52,8 @@ "request": "launch", "stopOnEntry": false, "program": "${workspaceRoot}/server/publish.lua", - "cwd": "${workspaceRoot}/server", //"luaexe": "${workspaceRoot}\\server\\bin\\lua-language-server.exe", //"luadll": "${workspaceRoot}\\server\\bin\\lua54.dll", - "path": "${workspaceRoot}/server/bin/?.lua", - "cpath": "${workspaceRoot}/server/bin/?.dll;", "arg": [ ], "consoleCoding": "utf8", diff --git a/server/src/uri.lua b/server/src/uri.lua index 4505d554..ec3cdad6 100644 --- a/server/src/uri.lua +++ b/server/src/uri.lua @@ -17,7 +17,7 @@ local function decode(uri) end local function encode(path) - local fullPath = fs.absolute(path) + local fullPath = fs.absolute(ROOT / path) local obj = URI_FILE.make_file_uri(fullPath:string(), OS) local uri = obj:uri() return uri diff --git a/server/test.lua b/server/test.lua index 8a1a9596..b1945a0e 100644 --- a/server/test.lua +++ b/server/test.lua @@ -12,7 +12,6 @@ package.path = rootPath .. 'test/?.lua' local fs = require 'bee.filesystem' ROOT = fs.absolute(fs.path(rootPath):parent_path()) -print('ROOT =', ROOT) LANG = 'en-US' log = require 'log' diff --git a/server/test/crossfile/hover.lua b/server/test/crossfile/hover.lua index 47fa0a45..1d4328e1 100644 --- a/server/test/crossfile/hover.lua +++ b/server/test/crossfile/hover.lua @@ -86,7 +86,7 @@ function TEST(data) if hover.label then hover.label = hover.label:gsub('\r\n', '\n') end - assert(eq(hover, data.hover), table.dump(hover) .. '\n' .. table.dump(data.hover)) + assert(eq(hover, data.hover)) end TEST { |