diff options
author | kylo252 <[email protected]> | 2021-10-20 18:35:07 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-20 18:35:07 +0200 |
commit | cfdd5e61f9d92763994b41fa5b5e1daac2f2ab95 (patch) | |
tree | 87b5e29107853538d7638b89d8221b6b35d9f679 /utils/installer/config.example.lua | |
parent | 5cf8c07ee921f8dfed03415fe5b8322754ea8615 (diff) |
fix(docs): update telescope's example config (#1814)
Diffstat (limited to 'utils/installer/config.example.lua')
-rw-r--r-- | utils/installer/config.example.lua | 23 |
1 files changed, 14 insertions, 9 deletions
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["<C-s>"] = ":w<cr>" -- lvim.keys.normal_mode["<C-q>"] = ":q<cr>" -- 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["<C-j>"] = actions.move_selection_next --- lvim.builtin.telescope.defaults.mappings.i["<C-k>"] = actions.move_selection_previous --- lvim.builtin.telescope.defaults.mappings.i["<C-n>"] = actions.cycle_history_next --- lvim.builtin.telescope.defaults.mappings.i["<C-p>"] = actions.cycle_history_prev +-- i = { +-- ["<C-j>"] = actions.move_selection_next, +-- ["<C-k>"] = actions.move_selection_previous, +-- ["<C-n>"] = actions.cycle_history_next, +-- ["<C-p>"] = actions.cycle_history_prev, +-- }, -- -- for normal mode --- lvim.builtin.telescope.defaults.mappings.n["<C-j>"] = actions.move_selection_next --- lvim.builtin.telescope.defaults.mappings.n["<C-k>"] = actions.move_selection_previous --- end +-- n = { +-- ["<C-j>"] = actions.move_selection_next, +-- ["<C-k>"] = actions.move_selection_previous, +-- }, +-- } -- Use which-key to add extra bindings with the leader-key prefix -- lvim.builtin.which_key.mappings["P"] = { "<cmd>Telescope projects<CR>", "Projects" } |