mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 07:24:52 +01:00
chore: less stuff on setup return
This commit is contained in:
parent
cce2cc5a37
commit
3c3c1fd7c4
1 changed files with 4 additions and 9 deletions
|
@ -3,12 +3,12 @@ local session = nil
|
||||||
local native = nil
|
local native = nil
|
||||||
local timer = nil
|
local timer = nil
|
||||||
|
|
||||||
local function setup(opts)
|
local function setup(_opts)
|
||||||
local path = vim.fn.stdpath('data') .. '/codemp/'
|
local path = vim.fn.stdpath('data') .. '/codemp/'
|
||||||
if vim.fn.isdirectory(path) == 0 then
|
if vim.fn.isdirectory(path) == 0 then
|
||||||
vim.fn.mkdir(path, 'p')
|
vim.fn.mkdir(path, 'p')
|
||||||
end
|
end
|
||||||
|
|
||||||
if native == nil then
|
if native == nil then
|
||||||
native = require('codemp.loader').load() -- make sure we can load the native library correctly, otherwise no point going forward
|
native = require('codemp.loader').load() -- make sure we can load the native library correctly, otherwise no point going forward
|
||||||
--native.logger(function (msg)
|
--native.logger(function (msg)
|
||||||
|
@ -35,9 +35,9 @@ local function setup(opts)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
local timer_interval = vim.g.codemp_callback_interval or 100
|
local timer_interval = vim.g.codemp_callback_interval or 100
|
||||||
|
|
||||||
if timer == nil then
|
if timer == nil then
|
||||||
timer = vim.loop.new_timer()
|
timer = vim.loop.new_timer()
|
||||||
timer:start(timer_interval, timer_interval, function()
|
timer:start(timer_interval, timer_interval, function()
|
||||||
|
@ -54,11 +54,6 @@ local function setup(opts)
|
||||||
return {
|
return {
|
||||||
native = native,
|
native = native,
|
||||||
session = session,
|
session = session,
|
||||||
buffers = require('codemp.buffers'),
|
|
||||||
workspace = require('codemp.workspace'),
|
|
||||||
window = require('codemp.window'),
|
|
||||||
utils = require('codemp.utils'),
|
|
||||||
logger = native.logger,
|
|
||||||
rt = rt,
|
rt = rt,
|
||||||
callbacks_timer = timer,
|
callbacks_timer = timer,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue