mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-18 18:01:17 +00:00
Telescope: fix projects binding, add Telescope resume in default
The projects command had a typo preventing it from working; the keybinding description was the same as for Telescope files. Added `<leader>fr` for Telescope resume per default.
This commit is contained in:
parent
67abc51902
commit
6f47200c65
2 changed files with 67 additions and 64 deletions
|
|
@ -17,17 +17,19 @@
|
|||
mappings = addDescriptionsToMappings cfg.mappings mappingDefinitions;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = [
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"telescope"
|
||||
"plenary-nvim"
|
||||
];
|
||||
|
||||
vim.maps.normal = mkMerge [
|
||||
maps.normal = mkMerge [
|
||||
(mkSetBinding mappings.findFiles "<cmd> Telescope find_files<CR>")
|
||||
(mkSetBinding mappings.liveGrep "<cmd> Telescope live_grep<CR>")
|
||||
(mkSetBinding mappings.buffers "<cmd> Telescope buffers<CR>")
|
||||
(mkSetBinding mappings.helpTags "<cmd> Telescope help_tags<CR>")
|
||||
(mkSetBinding mappings.open "<cmd> Telescope<CR>")
|
||||
(mkSetBinding mappings.resume "<cmd> Telescope resume<CR>")
|
||||
|
||||
(mkSetBinding mappings.gitCommits "<cmd> Telescope git_commits<CR>")
|
||||
(mkSetBinding mappings.gitBufferCommits "<cmd> Telescope git_bcommits<CR>")
|
||||
|
|
@ -53,11 +55,11 @@ in {
|
|||
|
||||
(
|
||||
mkIf config.vim.projects.project-nvim.enable
|
||||
(mkSetBinding mappings.findProjects "<cmd Telescope projects<CR>")
|
||||
(mkSetBinding mappings.findProjects "<cmd> Telescope projects<CR>")
|
||||
)
|
||||
];
|
||||
|
||||
vim.binds.whichKey.register = pushDownDefault {
|
||||
binds.whichKey.register = pushDownDefault {
|
||||
"<leader>f" = "+Telescope";
|
||||
"<leader>fl" = "Telescope LSP";
|
||||
"<leader>fm" = "Cellular Automaton";
|
||||
|
|
@ -65,7 +67,7 @@ in {
|
|||
"<leader>fvc" = "Commits";
|
||||
};
|
||||
|
||||
vim.pluginRC.telescope = entryAnywhere ''
|
||||
pluginRC.telescope = entryAnywhere ''
|
||||
local telescope = require('telescope')
|
||||
telescope.setup(${toLuaObject cfg.setupOpts})
|
||||
|
||||
|
|
@ -88,4 +90,5 @@ in {
|
|||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,13 +150,13 @@
|
|||
in {
|
||||
options.vim.telescope = {
|
||||
mappings = {
|
||||
findProjects = mkMappingOption "Find files [Telescope]" "<leader>fp";
|
||||
|
||||
findProjects = mkMappingOption "Find projects [Telescope]" "<leader>fp";
|
||||
findFiles = mkMappingOption "Find files [Telescope]" "<leader>ff";
|
||||
liveGrep = mkMappingOption "Live grep [Telescope]" "<leader>fg";
|
||||
buffers = mkMappingOption "Buffers [Telescope]" "<leader>fb";
|
||||
helpTags = mkMappingOption "Help tags [Telescope]" "<leader>fh";
|
||||
open = mkMappingOption "Open [Telescope]" "<leader>ft";
|
||||
resume = mkMappingOption "Resume (previous search) [Telescope]" "<leader>fr";
|
||||
|
||||
gitCommits = mkMappingOption "Git commits [Telescope]" "<leader>fvcw";
|
||||
gitBufferCommits = mkMappingOption "Git buffer commits [Telescope]" "<leader>fvcb";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue