Trans.nvim/lua/Trans/init.lua

30 lines
593 B
Lua
Raw Normal View History

2022-12-17 20:51:22 +08:00
local M = {}
2022-12-17 16:07:27 +08:00
M.conf = require("Trans.conf")
function M.setup(conf)
2022-12-25 09:02:37 +08:00
conf = conf or {}
for k, v in pairs(conf) do
if type(v) == 'table' then
M.conf[k] = vim.tbl_extend('force', M.conf[k], v)
else
M.conf[k] = v
end
2022-12-20 12:05:36 +08:00
end
M.conf = vim.tbl_extend('force', M.conf, conf)
require("Trans.setup")
end
2022-12-17 20:51:22 +08:00
2022-12-22 11:06:49 +08:00
local res = vim.fn.executable('sqlite3')
if res ~= 1 then
error('Please check out sqlite3')
end
local status, db = pcall(require, 'sqlite.db')
if not status then
error('Please check out sqlite.lua')
end
M.db = db
2022-12-17 16:07:27 +08:00
return M