Skip to content

Commit

Permalink
chore: add note about global config for plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jellydn committed Oct 29, 2023
1 parent b444548 commit 61c23d6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lua/hurl/init.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
--- Global configuration for hurl.nvim
_HURL_CFG = {
--- Default configuration for hurl.nvim
local default_config = {
debug = false,
mode = 'split',
}
--- Global configuration for entire plugin, easy to access from anywhere
_HURL_CFG = default_config
local M = {}

--- Setup hurl.nvim
---@param options (table | nil)
-- - debug: (boolean | nil) default: false.
-- - mode: ('popup' | 'split') default: popup.
function M.setup(options)
_HURL_CFG = vim.tbl_extend('force', _HURL_CFG, options or {})
_HURL_CFG = vim.tbl_extend('force', _HURL_CFG, options or default_config)

require('hurl.main').setup()
end
Expand Down

0 comments on commit 61c23d6

Please sign in to comment.