From 61c23d602c479560ebe4bbf688b7d78a1863942f Mon Sep 17 00:00:00 2001 From: Huynh Duc Dung Date: Mon, 30 Oct 2023 00:20:52 +0800 Subject: [PATCH] chore: add note about global config for plugin --- lua/hurl/init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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