From 104d557788108ef3b7ac8cb56951f96b4d4fe170 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 12 Jun 2024 02:53:00 -0500 Subject: [PATCH] refactor(nvim): improve `hop` integration with `neo-tree` --- users/price/dots/.config/nvim/lua/plugins/configs/hop.lua | 8 +++++++- .../dots/.config/nvim/lua/plugins/configs/neo-tree.lua | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/hop.lua b/users/price/dots/.config/nvim/lua/plugins/configs/hop.lua index 164ffea1..a34ae4df 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/hop.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/hop.lua @@ -5,7 +5,13 @@ return { { "f", function() - require("hop").hint_char1({ current_line_only = false }) + if vim.bo.filetype == "neo-tree" then + ---@diagnostic disable-next-line: missing-fields + require("hop").hint_lines({}) + else + ---@diagnostic disable-next-line: missing-fields + require("hop").hint_char1({ current_line_only = false }) + end end, desc = "Hop: Character", mode = { "" }, diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/neo-tree.lua b/users/price/dots/.config/nvim/lua/plugins/configs/neo-tree.lua index 7d2e695e..7ce6747e 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/neo-tree.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/neo-tree.lua @@ -60,6 +60,8 @@ return { mappings = { [""] = "none", ["/"] = "none", + ["f"] = "none", + ["F"] = "fuzzy_finder", }, }, }