Closed hejops closed 6 months ago
Fixed in the latest release
Great, thanks!
i am using b62a4ad
commit and still have this issue. please advice.
@azinsharaf Could you kindly share your configs for Telescope and chezmoi.nvim?
chezmoi.lua
return {
"xvzc/chezmoi.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("chezmoi").setup({
-- your configurations
edit = {
watch = true, -- Set true to automatically apply on save.
force = true, -- Set true to force apply. Works only when watch = true.
},
notification = {
on_open = true, -- vim.notify when start editing chezmoi-managed file.
on_apply = true, -- vim.notify on apply.
},
})
end,
}
telescope.lua:
return {
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = {
"nvim-lua/plenary.nvim",
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available. Make sure you have the system
-- requirements installed.
{
"nvim-telescope/telescope-fzf-native.nvim",
-- NOTE: If you are having trouble with this installation,
-- refer to the README for telescope-fzf-native for more instructions.
build = "make",
cond = function()
return vim.fn.executable("make") == 1
end,
},
{
"nvim-tree/nvim-web-devicons",
},
},
config = function()
local telescope = require("telescope")
local actions = require("telescope.actions")
telescope.setup({
defaults = {
mappings = {
i = {
["<C-k>"] = actions.move_selection_previous, --move to prev result
["<C-j>"] = actions.move_selection_next, --move to next result
},
},
},
extensions = {
file_browser = {
hidden = { file_browser = true, folder_browser = true },
display_stat = { date = true, size = true, mode = true },
},
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
},
},
})
require("telescope").load_extension("fzf")
require("telescope").load_extension("chezmoi")
vim.keymap.set('n', '<leader>cz', telescope.extensions.chezmoi.find_files, {})
end,
}
nvim error:
E5108: Error executing lua: ...-data/lazy/telescope.nvim/lua/telescope/actions/init.lua:74:
Key does not exist for 'telescope.actions': select_tab_drop
stack traceback:
[C]: in function 'error'
...-data/lazy/telescope.nvim/lua/telescope/actions/init.lua:74: in function '__inde
x'
...zy/chezmoi.nvim/lua/telescope/_extensions/find_files.lua:67: in function 'attach
_mappings'
...nvim-data/lazy/telescope.nvim/lua/telescope/mappings.lua:287: in function 'apply
_keymap'
.../nvim-data/lazy/telescope.nvim/lua/telescope/pickers.lua:569: in function 'find'
...zy/chezmoi.nvim/lua/telescope/_extensions/find_files.lua:74: in function <...zy/
chezmoi.nvim/lua/telescope/_extensions/find_files.lua:37>
@azinsharaf Are you using the latest version of telescope?
yes, 0.1.5
@azinsharaf Sorry to bother you. Please try with the latest release again, and check out that we can now set the select keymap through your config
local default_config = {
edit = {
watch = false,
force = false,
},
notification = {
on_open = true,
on_apply = true,
on_watch = false,
},
telescope = {
select = { "<CR>" },
},
}
you did it! thanks for the quick turnaround!
No problems!
It seems like
find_files
only callschezmoi edit
if the telescope select action is the default (open in current window). Ifselect_tab_drop
is set as the default,select_tab_drop
will still be called correctly, butchezmoi edit
will not.Minimal config