From dadf0dc48b31073c7b09dbdeabed6541c0584561 Mon Sep 17 00:00:00 2001 From: Anthony Flores <70184250+anthonyokc@users.noreply.github.com> Date: Sun, 15 Sep 2024 09:55:08 -0500 Subject: [PATCH] fix: use correct non-nil variables (closes #568) (#587) --- lua/avante/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/avante/init.lua b/lua/avante/init.lua index 9a63c9c..08461cb 100644 --- a/lua/avante/init.lua +++ b/lua/avante/init.lua @@ -167,7 +167,7 @@ H.keymaps = function() ) end - if Config.behaviour.auto_suggestion then + if Config.behaviour.auto_suggestions then Utils.safe_keymap_set("i", Config.mappings.suggestion.accept, function() local _, _, sg = M.get() sg:accept() @@ -371,9 +371,9 @@ M.toggle.hint = H.api(Utils.toggle_wrap({ M.toggle.suggestion = H.api(Utils.toggle_wrap({ name = "suggestion", - get = function() return Config.behaviour.auto_suggestion end, + get = function() return Config.behaviour.auto_suggestions end, set = function(state) - Config.override({ behaviour = { auto_suggestion = state } }) + Config.override({ behaviour = { auto_suggestions = state } }) local _, _, sg = M.get() if state ~= false then if sg then sg:setup_autocmds() end