forked from rest-nvim/rest.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
38 lines (32 loc) · 736 Bytes
/
init.lua
File metadata and controls
38 lines (32 loc) · 736 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
local M = {}
local config = {
result_split_horizontal = false,
skip_ssl_verification = false,
highlight = {
enabled = true,
timeout = 150,
},
jump_to_request = false,
}
--- Get a configuration value
--- @param opt string
--- @return any
M.get = function(opt)
-- If an option was passed then
-- return the requested option.
-- Otherwise, return the entire
-- configurations.
if opt then
return config[opt]
end
return config
end
--- Set user-defined configurations
--- @param user_configs table
--- @return table
M.set = function(user_configs)
vim.validate({ user_configs = { user_configs, "table" } })
config = vim.tbl_deep_extend("force", config, user_configs)
return config
end
return M