Skip to content

Commit

Permalink
fix: dont cache as aggressively (#20)
Browse files Browse the repository at this point in the history
Co-authored-by: tris203 <[email protected]>
  • Loading branch information
tris203 and tris203 authored Dec 18, 2023
1 parent bdbffa7 commit 01625e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lua/hawtkeys/ts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 01625e1

Please sign in to comment.