From 13dc7fefa2662f2fa9a324b654af32753c876d28 Mon Sep 17 00:00:00 2001 From: CMOISDEAD Date: Fri, 3 Mar 2023 18:58:30 -0500 Subject: [PATCH 1/4] feat(main): notification message --- lua/telescope/_extensions/zoxide/config.lua | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lua/telescope/_extensions/zoxide/config.lua b/lua/telescope/_extensions/zoxide/config.lua index ab54410..90129fc 100644 --- a/lua/telescope/_extensions/zoxide/config.lua +++ b/lua/telescope/_extensions/zoxide/config.lua @@ -6,7 +6,6 @@ local config = {} local default_config = { prompt_title = "[ Zoxide List ]", - -- Zoxide list command with score list_command = "zoxide query -ls", mappings = { @@ -15,25 +14,26 @@ local default_config = { vim.cmd.cd(selection.path) end, after_action = function(selection) - print("Directory changed to " .. selection.path) + vim.notify("Directory changed to " .. selection.path) + -- print("Directory changed to " .. selection.path) end }, - [""] = { action = z_utils.create_basic_command("split") }, - [""] = { action = z_utils.create_basic_command("vsplit") }, - [""] = { action = z_utils.create_basic_command("edit") }, - [""] = { + [""] = { action = z_utils.create_basic_command("split") }, + [""] = { action = z_utils.create_basic_command("vsplit") }, + [""] = { action = z_utils.create_basic_command("edit") }, + [""] = { keepinsert = true, action = function(selection) builtin.file_browser({ cwd = selection.path }) end }, - [""] = { + [""] = { keepinsert = true, action = function(selection) builtin.find_files({ cwd = selection.path }) end }, - [""] = { + [""] = { action = function(selection) vim.cmd.tcd(selection.path) end @@ -63,7 +63,6 @@ config.setup = function(user_config) -- Copy defaults in temp mapping for map_key, map_value in pairs(default_config.mappings) do for action_key, action_value in pairs(map_value) do - if temp_mappings[map_key] == nil then temp_mappings[map_key] = {} end From 26d31795a3a5428616d1de2a73949154f346a492 Mon Sep 17 00:00:00 2001 From: Camilo Davila Date: Thu, 1 Aug 2024 00:56:38 +0000 Subject: [PATCH 2/4] ref: unnecessary format removed --- lua/telescope/_extensions/zoxide/config.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/telescope/_extensions/zoxide/config.lua b/lua/telescope/_extensions/zoxide/config.lua index 90129fc..e58c1a4 100644 --- a/lua/telescope/_extensions/zoxide/config.lua +++ b/lua/telescope/_extensions/zoxide/config.lua @@ -15,7 +15,6 @@ local default_config = { end, after_action = function(selection) vim.notify("Directory changed to " .. selection.path) - -- print("Directory changed to " .. selection.path) end }, [""] = { action = z_utils.create_basic_command("split") }, From 4c88ede9e567a0893027d68c8b094d1af1f83954 Mon Sep 17 00:00:00 2001 From: Camilo Davila Date: Thu, 1 Aug 2024 19:26:51 +0000 Subject: [PATCH 3/4] ref: remove unnecessary indenting --- lua/telescope/_extensions/zoxide/config.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/telescope/_extensions/zoxide/config.lua b/lua/telescope/_extensions/zoxide/config.lua index e58c1a4..d55d790 100644 --- a/lua/telescope/_extensions/zoxide/config.lua +++ b/lua/telescope/_extensions/zoxide/config.lua @@ -17,22 +17,22 @@ local default_config = { vim.notify("Directory changed to " .. selection.path) end }, - [""] = { action = z_utils.create_basic_command("split") }, - [""] = { action = z_utils.create_basic_command("vsplit") }, - [""] = { action = z_utils.create_basic_command("edit") }, - [""] = { + [""] = { action = z_utils.create_basic_command("split") }, + [""] = { action = z_utils.create_basic_command("vsplit") }, + [""] = { action = z_utils.create_basic_command("edit") }, + [""] = { keepinsert = true, action = function(selection) builtin.file_browser({ cwd = selection.path }) end }, - [""] = { + [""] = { keepinsert = true, action = function(selection) builtin.find_files({ cwd = selection.path }) end }, - [""] = { + [""] = { action = function(selection) vim.cmd.tcd(selection.path) end @@ -62,6 +62,7 @@ config.setup = function(user_config) -- Copy defaults in temp mapping for map_key, map_value in pairs(default_config.mappings) do for action_key, action_value in pairs(map_value) do + if temp_mappings[map_key] == nil then temp_mappings[map_key] = {} end From 8a4c49db10045a72e1ced93f86236a9e84672394 Mon Sep 17 00:00:00 2001 From: Camilo Davila Date: Thu, 1 Aug 2024 19:29:58 +0000 Subject: [PATCH 4/4] ref: another format change removed --- lua/telescope/_extensions/zoxide/config.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/telescope/_extensions/zoxide/config.lua b/lua/telescope/_extensions/zoxide/config.lua index d55d790..91f8537 100644 --- a/lua/telescope/_extensions/zoxide/config.lua +++ b/lua/telescope/_extensions/zoxide/config.lua @@ -6,6 +6,7 @@ local config = {} local default_config = { prompt_title = "[ Zoxide List ]", + -- Zoxide list command with score list_command = "zoxide query -ls", mappings = {