mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 07:24:52 +01:00
fix: setup just changes config
so its not really needed
This commit is contained in:
parent
51d65eab3d
commit
8a12b109ff
1 changed files with 42 additions and 44 deletions
|
@ -12,19 +12,22 @@ if CODEMP == nil then
|
|||
},
|
||||
setup = function (opts)
|
||||
CODEMP.config = vim.tbl_extend('force', CODEMP.config, opts)
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
if CODEMP.native == nil then
|
||||
if CODEMP.native == nil then
|
||||
CODEMP.native = require('codemp.loader').load() -- make sure we can load the native library correctly, otherwise no point going forward
|
||||
--CODEMP.native.logger(function (msg)
|
||||
-- vim.schedule(function () print(msg) end)
|
||||
--end, true)
|
||||
end
|
||||
end
|
||||
|
||||
if CODEMP.session == nil then
|
||||
if CODEMP.session == nil then
|
||||
CODEMP.session = require('codemp.session')
|
||||
end
|
||||
end
|
||||
|
||||
if CODEMP.rt == nil then
|
||||
if CODEMP.rt == nil then
|
||||
CODEMP.rt = CODEMP.native.spawn_runtime_driver() -- spawn thread to drive tokio runtime
|
||||
vim.api.nvim_create_autocmd(
|
||||
{"ExitPre"},
|
||||
|
@ -38,9 +41,9 @@ if CODEMP == nil then
|
|||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
if CODEMP.timer == nil then
|
||||
if CODEMP.timer == nil then
|
||||
CODEMP.timer = vim.loop.new_timer()
|
||||
CODEMP.timer:start(CODEMP.config.timer_interval, CODEMP.config.timer_interval, function()
|
||||
while true do
|
||||
|
@ -51,12 +54,7 @@ if CODEMP == nil then
|
|||
end)
|
||||
|
||||
require('codemp.command') -- not really related but should only happen once
|
||||
end
|
||||
|
||||
|
||||
return CODEMP
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
return CODEMP
|
||||
|
|
Loading…
Reference in a new issue