I made a quick plugin to open files found on Telescope inside Neotree:
local open_in_neo_tree = function(prompt_bufnr)
local action_state = require "telescope.actions.state"
local Path = require "plenary.path"
local actions = require "telescope.actions"
local entry = action_state.get_selected_entry()[1]
local entry_path = Path:new(entry):parent():absolute()
actions._close(prompt_bufnr, true)
entry_path = Path:new(entry):parent():absolute()
entry_path = entry_path:gsub("\\", "\\\\")
vim.cmd("Neotree close")
file_name = nil
for s in string.gmatch(entry, "[^/]+") do
file_name = s
end
vim.cmd("Neotree filesystem reveal reveal_file=" .. entry_path .. "/" .. file_name)
end
require("telescope").setup {
defaults = {
layout_strategy = "vertical",
mappings = {
i = {
[""] = open_in_neo_tree,
},
....
You must log in or # to comment.
Great, I’m gonna try to find a working use case with the new telescope tabs plugin https://github.com/FabianWirth/search.nvim#customizing-tabs
Why put this in a tab? It’s just a hockey.