Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dont cache as aggressively #20

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading