From 636d9b23bef0e09db53817abbe750bb27656a8bf Mon Sep 17 00:00:00 2001 From: tris203 Date: Mon, 18 Dec 2023 19:41:30 +0000 Subject: [PATCH] fix: dont cache as aggressively --- lua/hawtkeys/ts.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/hawtkeys/ts.lua b/lua/hawtkeys/ts.lua index 6d729b8..f0c3ac7 100644 --- a/lua/hawtkeys/ts.lua +++ b/lua/hawtkeys/ts.lua @@ -6,7 +6,6 @@ local config = require("hawtkeys") local ts = require("nvim-treesitter.compat") local tsQuery = require("nvim-treesitter.query") -local returnKeymaps = {} local scannedFiles = {} ---@param dir string ---@return table @@ -95,9 +94,10 @@ end ---@return table function M.get_all_keymaps() - if next(returnKeymaps) ~= nil then + local returnKeymaps + --[[ if next(returnKeymaps) ~= nil then return returnKeymaps - end + end ]] local keymaps = {} local paths = get_runtime_path() for _, path in ipairs(paths) do @@ -113,6 +113,7 @@ function M.get_all_keymaps() end local vimKeymaps = get_keymaps_from_vim() returnKeymaps = utils.merge_tables(keymaps, vimKeymaps) + scannedFiles = {} return returnKeymaps end