File tree 3 files changed +17
-5
lines changed
3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,11 @@ require("persisted").setup({
163
163
ignored_dirs = nil , -- table of dirs that are ignored when auto-saving and auto-loading
164
164
telescope = {
165
165
reset_prompt = true , -- Reset the Telescope prompt after an action?
166
+ mappings = { -- table of mappings for the Telescope extension
167
+ change_branch = " <c-b>" ,
168
+ copy_session = " <c-c>" ,
169
+ delete_session = " <c-d>" ,
170
+ },
166
171
},
167
172
})
168
173
```
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ local defaults = {
21
21
telescope = {
22
22
reset_prompt = true , -- Reset prompt after a telescope action?
23
23
-- TODO: We should add a deprecation notice for the old API here
24
+ mappings = {
25
+ change_branch = " <c-b>" ,
26
+ copy_session = " <c-c>" ,
27
+ delete_session = " <c-d>" ,
28
+ },
24
29
},
25
30
}
26
31
Original file line number Diff line number Diff line change @@ -30,13 +30,15 @@ local function search_sessions(opts)
30
30
_actions .copy_session :enhance ({ post = refresh_sessions })
31
31
_actions .delete_session :enhance ({ post = refresh_sessions })
32
32
33
- map ( " i " , " <c-b> " , function ()
33
+ local change_session_branch = function ()
34
34
return _actions .change_branch (config )
35
- end )
36
- map ( " i " , " <c-c> " , function ()
35
+ end
36
+ local copy_session = function ()
37
37
return _actions .copy_session (config )
38
- end )
39
- map (" i" , " <c-d>" , _actions .delete_session )
38
+ end
39
+ map (" i" , config .telescope .mappings .change_branch , change_session_branch )
40
+ map (" i" , config .telescope .mappings .copy_session , copy_session )
41
+ map (" i" , config .telescope .mappings .delete_session , _actions .delete_session )
40
42
41
43
actions .select_default :replace (function ()
42
44
local session = action_state .get_selected_entry ()
You can’t perform that action at this time.
0 commit comments