mirror of
https://github.com/Ascyii/telekasten.nvim.git
synced 2026-01-01 06:14:23 -05:00
fix follow-up picker for nvim-0.7 nightly with latest telescope
This commit is contained in:
@@ -2196,10 +2196,11 @@ local function FollowLink(opts)
|
|||||||
)
|
)
|
||||||
|
|
||||||
-- builtin.live_grep({
|
-- builtin.live_grep({
|
||||||
pickers.new({
|
local picker = pickers.new({
|
||||||
cwd = cwd,
|
cwd = cwd,
|
||||||
prompt_title = "Notes referencing `" .. title .. "`",
|
prompt_title = "Notes referencing `" .. title .. "`",
|
||||||
default_text = search_pattern,
|
default_text = search_pattern,
|
||||||
|
initial_mode = "insert",
|
||||||
-- link to specific file (a daily file): [[2021-02-22]]
|
-- link to specific file (a daily file): [[2021-02-22]]
|
||||||
-- link to heading in specific file (a daily file): [[2021-02-22#Touchpoint]]
|
-- link to heading in specific file (a daily file): [[2021-02-22#Touchpoint]]
|
||||||
-- link to heading globally [[#Touchpoint]]
|
-- link to heading globally [[#Touchpoint]]
|
||||||
@@ -2218,7 +2219,8 @@ local function FollowLink(opts)
|
|||||||
map("n", "<c-cr>", picker_actions.paste_link(opts))
|
map("n", "<c-cr>", picker_actions.paste_link(opts))
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
}):find()
|
})
|
||||||
|
picker:find()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -2451,15 +2453,16 @@ local function FindAllTags(opts)
|
|||||||
sorter = conf.generic_sorter(opts),
|
sorter = conf.generic_sorter(opts),
|
||||||
attach_mappings = function(prompt_bufnr, map)
|
attach_mappings = function(prompt_bufnr, map)
|
||||||
actions.select_default:replace(function()
|
actions.select_default:replace(function()
|
||||||
actions._close(prompt_bufnr, true)
|
|
||||||
|
|
||||||
-- actions for insert tag, default action: search for tag
|
-- actions for insert tag, default action: search for tag
|
||||||
local selection = action_state.get_selected_entry().value.tag
|
local selection = action_state.get_selected_entry().value.tag
|
||||||
local follow_opts = {
|
local follow_opts = {
|
||||||
follow_tag = selection,
|
follow_tag = selection,
|
||||||
show_link_counts = true,
|
show_link_counts = true,
|
||||||
}
|
}
|
||||||
FollowLink(follow_opts)
|
actions._close(prompt_bufnr, false)
|
||||||
|
vim.schedule(function()
|
||||||
|
FollowLink(follow_opts)
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
map("i", "<c-y>", picker_actions.yank_tag(opts))
|
map("i", "<c-y>", picker_actions.yank_tag(opts))
|
||||||
map("i", "<c-i>", picker_actions.paste_tag(opts))
|
map("i", "<c-i>", picker_actions.paste_tag(opts))
|
||||||
|
|||||||
Reference in New Issue
Block a user