From f61e0a1419d581ba6b796faa4adfe7bfbcae4838 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Fri, 20 Oct 2023 20:53:06 -0600 Subject: [PATCH] don't load config until setup() is called --- lua/thethethe/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/thethethe/init.lua b/lua/thethethe/init.lua index 7b4ca3e..13f9a49 100644 --- a/lua/thethethe/init.lua +++ b/lua/thethethe/init.lua @@ -1,8 +1,5 @@ local M = {} --- load our default configuration -local config = require("thethethe.config") - -- load abbreviations.dict local function load_abbreviations() -- load our dictionary string @@ -25,6 +22,9 @@ end -- create our exported setup() function function M.setup(opts) + -- load our default configuration + local config = require("thethethe.config") + -- check for default overrides passed in if opts then config.delay_ms = opts.delay_ms or config.delay_ms