Closed Ajaymamtora closed 3 months ago
When defining a custom layout, the picker specific mappings don't work or apply
NVIM v0.10.0 Build type: Release LuaJIT 2.1.1713484068 Run "nvim -V1 -v" for more info
MacOS Sonoma 14
Master 79552ef
============================================================================== telescope: health#telescope#check Checking for required plugins ~ - OK plenary installed. - OK nvim-treesitter installed. Checking external dependencies ~ - OK rg: found ripgrep 14.1.0 - OK fd: found fd 10.1.0 ===== Installed extensions ===== ~ Telescope Extension: `diff` ~ - No healthcheck provided Telescope Extension: `file_browser` ~ - No healthcheck provided Telescope Extension: `find_template` ~ - No healthcheck provided Telescope Extension: `fzf` ~ - OK lib working as expected - OK file_sorter correctly configured - OK generic_sorter correctly configured Telescope Extension: `lazygit` ~ - No healthcheck provided Telescope Extension: `nerdy` ~ - No healthcheck provided Telescope Extension: `notify` ~ - No healthcheck provided Telescope Extension: `persisted` ~ - No healthcheck provided Telescope Extension: `refactoring` ~ - No healthcheck provided Telescope Extension: `smart_open` ~ - No healthcheck provided Telescope Extension: `textcase` ~ - No healthcheck provided Telescope Extension: `tmux` ~ - No healthcheck provided Telescope Extension: `undo` ~ - No healthcheck provided
-- setup defaults.pickers.live_grep where nui_hybrid_layout_fn is the hybrid layout in the recipes section: ... create_layout = require("utils.telescope_utils").nui_hybrid_layout_fn, ... live_grep = { layout_strategy = "flex", layout_config = { horizontal = { size = { width = "90%", height = "90%", }, }, vertical = { size = { width = "90%", height = "90%", }, }, }, hidden = true, only_sort_text = true, -- Handled in args use_regex = false, file_ignore_patterns = {}, mappings = { i = { ["<M-l>"] = swap_regex_mode, ["<M-c>"] = swap_case_sensitive_mode, ["<M-x>"] = escape_regex_chars, ["<M-u>"] = refresh_picker, ["<M-r>"] = do_replace, }, n = { ["<M-l>"] = swap_regex_mode, ["<M-c>"] = swap_case_sensitive_mode, ["<M-x>"] = escape_regex_chars, ["<M-u>"] = refresh_picker, ["<M-r>"] = do_replace, }, }, }, },
mappings should still apply
they don't
where nui_hybrid_layout_fn is the hybrid layout in the recipes section ... create_layout = require("utils.telescope_utils").nui_hybrid_layout_fn, ... ```lua live_grep = { layout_strategy = "flex", layout_config = { horizontal = { size = { width = "90%", height = "90%", }, }, vertical = { size = { width = "90%", height = "90%", }, }, }, hidden = true, only_sort_text = true, -- Handled in args use_regex = false, file_ignore_patterns = {}, mappings = { i = { ["<M-l>"] = swap_regex_mode, ["<M-c>"] = swap_case_sensitive_mode, ["<M-x>"] = escape_regex_chars, ["<M-u>"] = refresh_picker, ["<M-r>"] = do_replace, }, n = { ["<M-l>"] = swap_regex_mode, ["<M-c>"] = swap_case_sensitive_mode, ["<M-x>"] = escape_regex_chars, ["<M-u>"] = refresh_picker, ["<M-r>"] = do_replace, }, }, },
nvm I messed up the nesting
Description
When defining a custom layout, the picker specific mappings don't work or apply
Neovim version
Operating system and version
MacOS Sonoma 14
Telescope version / branch / rev
Master 79552ef
checkhealth telescope
Steps to reproduce
Expected behavior
mappings should still apply
Actual behavior
they don't
Minimal config