diff --git a/lua/hurl/init.lua b/lua/hurl/init.lua index ad1107b..dec275a 100644 --- a/lua/hurl/init.lua +++ b/lua/hurl/init.lua @@ -1,8 +1,10 @@ ---- 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 @@ -10,7 +12,7 @@ local M = {} -- - 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