mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-21 23:14:54 +01:00
fix: first time load should not break installation
This commit is contained in:
parent
dc6c675615
commit
2abe23e493
2 changed files with 7 additions and 3 deletions
|
@ -18,6 +18,9 @@ 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 = require('codemp.loader').load() -- make sure we can load the native library correctly, otherwise no point going forward
|
||||||
|
if CODEMP.native == nil then
|
||||||
|
print(" !! could not load native bindings, try reloading")
|
||||||
|
end
|
||||||
--CODEMP.native.logger(function (msg)
|
--CODEMP.native.logger(function (msg)
|
||||||
-- vim.schedule(function () print(msg) end)
|
-- vim.schedule(function () print(msg) end)
|
||||||
--end, true)
|
--end, true)
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
---@module 'annotations'
|
---@module 'annotations'
|
||||||
|
|
||||||
---@return Codemp
|
---@return Codemp?
|
||||||
local function load()
|
local function load()
|
||||||
local native, _ = require("codemp.native")
|
local ok, native = pcall(require, "codemp.native")
|
||||||
return native
|
if ok then return native end
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue