From cfdd5e61f9d92763994b41fa5b5e1daac2f2ab95 Mon Sep 17 00:00:00 2001 From: kylo252 <59826753+kylo252@users.noreply.github.com> Date: Wed, 20 Oct 2021 18:35:07 +0200 Subject: fix(docs): update telescope's example config (#1814) --- utils/installer/config.example.lua | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'utils/installer/config.example.lua') diff --git a/utils/installer/config.example.lua b/utils/installer/config.example.lua index 346fac98..897b2cf0 100644 --- a/utils/installer/config.example.lua +++ b/utils/installer/config.example.lua @@ -23,17 +23,22 @@ lvim.keys.normal_mode[""] = ":w" -- lvim.keys.normal_mode[""] = ":q" -- Change Telescope navigation to use j and k for navigation and n and p for history in both input and normal mode. --- lvim.builtin.telescope.on_config_done = function() --- local actions = require "telescope.actions" +-- we use protected-mode (pcall) just in case the plugin wasn't loaded yet. +-- local _, actions = pcall(require, "telescope.actions") +-- lvim.builtin.telescope.defaults.mappings = { -- -- for input mode --- lvim.builtin.telescope.defaults.mappings.i[""] = actions.move_selection_next --- lvim.builtin.telescope.defaults.mappings.i[""] = actions.move_selection_previous --- lvim.builtin.telescope.defaults.mappings.i[""] = actions.cycle_history_next --- lvim.builtin.telescope.defaults.mappings.i[""] = actions.cycle_history_prev +-- i = { +-- [""] = actions.move_selection_next, +-- [""] = actions.move_selection_previous, +-- [""] = actions.cycle_history_next, +-- [""] = actions.cycle_history_prev, +-- }, -- -- for normal mode --- lvim.builtin.telescope.defaults.mappings.n[""] = actions.move_selection_next --- lvim.builtin.telescope.defaults.mappings.n[""] = actions.move_selection_previous --- end +-- n = { +-- [""] = actions.move_selection_next, +-- [""] = actions.move_selection_previous, +-- }, +-- } -- Use which-key to add extra bindings with the leader-key prefix -- lvim.builtin.which_key.mappings["P"] = { "Telescope projects", "Projects" } -- cgit v1.2.3