From 5554fc1899e6229ba960c9b64b053ab414d7044f Mon Sep 17 00:00:00 2001 From: Tristan Knight Date: Tue, 12 Dec 2023 10:51:46 +0000 Subject: [PATCH] fix: add keymap caching (#1) Co-authored-by: tris203 --- lua/hawtkeys/ts.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/hawtkeys/ts.lua b/lua/hawtkeys/ts.lua index a50fe07..c52ea9b 100644 --- a/lua/hawtkeys/ts.lua +++ b/lua/hawtkeys/ts.lua @@ -4,6 +4,7 @@ local scan = require('plenary.scandir') local utils = require('hawtkeys.utils') local config = require('hawtkeys') +local keymaps = {} ---@param dir string ---@return table local function find_files(dir) @@ -69,10 +70,9 @@ end ---@return table function M.get_all_keymaps() - local keymaps = {} - --[[ if next(keymaps) ~= nil then + if next(keymaps) ~= nil then return keymaps - end ]] + end local paths = getRTP() for _, path in ipairs(paths) do if string.match(path, "%.config") then