From 314a6134ce8cacf7d1048b7864a04ecdf889d3dd Mon Sep 17 00:00:00 2001 From: tris203 Date: Sat, 6 Jan 2024 17:08:34 +0000 Subject: [PATCH] feat(windows support): change path filtering --- lua/hawtkeys/ts.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/hawtkeys/ts.lua b/lua/hawtkeys/ts.lua index 1a43acf..6f02bcf 100644 --- a/lua/hawtkeys/ts.lua +++ b/lua/hawtkeys/ts.lua @@ -33,7 +33,7 @@ local tsQuery = require("nvim-treesitter.query") ---@field method WhichKeyMethods ---@class LazyKeyMapArgs ----@field method LazyMethods +---@field method LazyMethodsts ---@type table local scannedFiles = {} @@ -469,7 +469,13 @@ function M.get_all_keymaps() end end else - local paths = get_runtime_path() + local paths = vim.fn.stdpath("config") + if type(paths) == "string" then + paths = { paths } + end + if not paths then + paths = get_runtime_path() + end for _, path in ipairs(paths) do if string.match(path, "%.config") then local files = find_files(path)