Compare commits

...

2 Commits

Author SHA1 Message Date
htran cb286b897d Merge branch 'fix-telescope-select-drop' into bleed 2023-10-02 10:58:19 -07:00
htran c893e567a1 Merge branch 'telescope-reuse-window' into bleed 2023-10-02 10:57:23 -07:00
1 changed files with 14 additions and 4 deletions

View File

@ -451,6 +451,17 @@ end
require('telescope').setup {
defaults = {
-- path_display = "smart", -- realisitically should trim out pathlets, but is buggy to git views
get_selection_window = function(_, entry)
local bufnr = entry.bufnr
local tabpage = vim.api.nvim_get_current_tabpage()
for _, win_id in ipairs(vim.api.nvim_tabpage_list_wins(tabpage)) do
if vim.api.nvim_win_get_buf(win_id) == bufnr then
return win_id
end
end
return 0 -- Fallback to default behavior
end,
mappings = {
n = {
['<C-u>'] = function(prompt_bufnr) tel_actionset.shift_selection(prompt_bufnr, -math.floor(term_height() / 2)) end,
@ -458,10 +469,8 @@ require('telescope').setup {
[harpoon_keymap] = function(prompt_bufnr)
mark_telescope_selections(prompt_bufnr)
end,
['<CR>'] = tel_actions.select_drop,
},
i = {
['<CR>'] = tel_actions.select_drop,
},
},
},
@ -476,7 +485,7 @@ require('telescope').setup {
case_mode = 'smart_case'
},
file_browser = {
theme = require('telescope.themes').get_ivy().theme,
theme = "ivy",
hiject_netrw = true, -- disables netrw and use file-browser instead
mappings = {
["i"] = {}, -- disable any shortcut in insert mode for now
@ -496,7 +505,8 @@ require('telescope').setup {
["s"] = fb_actions.toggle_all,
}
}
}
},
}
}