Skip to content

Commit 4c59602

Browse files
committed
try passing all deps to script execution
1 parent 0356e45 commit 4c59602

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

lua/eca/path_finder.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
local uv = vim.uv or vim.loop
22
local Utils = require("eca.utils")
3-
local Config = require("eca.config")
43
local Logger = require("eca.logger")
54

65
---@class eca.PathFinder

lua/eca/server.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ function M:start(opts)
103103
local this_file = debug.getinfo(1, "S").source:sub(2)
104104
local proj_root = vim.fn.fnamemodify(this_file, ":p:h:h:h")
105105
local script_path = proj_root .. "/scripts/server_path.lua"
106+
local logger_path = proj_root .. "/lua/eca/logger.lua"
107+
local utils_path = proj_root .. "/lua/eca/utils.lua"
106108

107109
local nvim_exe = vim.fn.exepath("nvim")
108110

@@ -112,7 +114,7 @@ function M:start(opts)
112114

113115
local lua_cmd = string.format("lua ServerPath.run(%s)", Utils.lua_quote(Config.server_path) or "")
114116

115-
local cmd = { nvim_exe, "--headless", "--noplugin", "-u", script_path, "-c", lua_cmd }
117+
local cmd = { nvim_exe, "--headless", "--noplugin", "-u", utils_path, "-u", logger_path, "-u", script_path, "-c", lua_cmd }
116118

117119
vim.system(cmd, { text = true }, function(out)
118120
if out.code ~= 0 then

tests/test_server_integration.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ T["server"]["start"] = function()
4646
return _G.server and _G.server:is_running()
4747
end, 100)
4848
]])
49-
eq(child.lua_get("_G.log"), true)
5049
eq(child.lua_get("_G.server_started"), true)
5150
sleep(1000)
5251
eq(child.lua_get("_G.server.initialized"), true)
@@ -59,7 +58,6 @@ T["server"]["start without initialize"] = function()
5958
return _G.server and _G.server:is_running()
6059
end, 100)
6160
]])
62-
eq(child.lua_get("_G.notifications"), true)
6361
eq(child.lua_get("_G.server_started"), true)
6462
sleep(1000)
6563
eq(child.lua_get("_G.server.initialized"), false)

0 commit comments

Comments
 (0)