-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.lua
More file actions
56 lines (51 loc) · 974 Bytes
/
Copy pathconfig.lua
File metadata and controls
56 lines (51 loc) · 974 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
local M = {}
M.defaults = {
cli = {
binary = "cr",
timeout = 0,
extra_args = {},
},
review = {
type = "all",
base = nil,
base_commit = nil,
},
diagnostics = {
enabled = true,
severity_map = {
critical = vim.diagnostic.severity.ERROR,
major = vim.diagnostic.severity.WARN,
minor = vim.diagnostic.severity.INFO,
},
virtual_text = true,
signs = true,
underline = true,
},
show = {
layout = "float",
float = {
width = 0.6,
height = 0.7,
border = "rounded",
},
},
quickfix = {
auto = false,
},
history = {
max_entries = 50,
},
on_review_complete = nil,
}
M._current = nil
function M.setup(user_opts)
M._current = vim.tbl_deep_extend("force", {}, M.defaults, user_opts or {})
return M._current
end
function M.get()
if not M._current then
M._current = vim.tbl_deep_extend("force", {}, M.defaults)
end
return M._current
end
return M