-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
26 lines (22 loc) 路 574 Bytes
/
Copy pathinit.lua
File metadata and controls
26 lines (22 loc) 路 574 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local M = {}
local ok, agitate_error = pcall(require, 'agitate.error')
if not ok then
local message = require('agitate.const.error').import
vim.notify(message, vim.log.levels.ERROR)
error(message, 0)
end
function M.setup()
local branch_ok, branch_or_err = pcall(require, 'agitate.api.branch')
if branch_ok then
branch_or_err.setup()
else
agitate_error.throw(branch_or_err)
end
local repo_ok, repo_or_err = pcall(require, 'agitate.api.repo')
if repo_ok then
repo_or_err.setup()
else
agitate_error.throw(repo_or_err)
end
end
return M