@@ -281,6 +281,11 @@ local DEFAULT_SETTINGS = {
281
281
window :perform_close (ScopeActions .open_loaded )
282
282
end , { desc = " Go to loaded scopes" })
283
283
284
+ -- Toggle
285
+ window :map (" n" , " g." , function ()
286
+ window :perform_retain (ScopeActions .toggle_all )
287
+ end , { desc = " Toggle show hidden" })
288
+
284
289
-- Help
285
290
window :map (" n" , " ?" , function ()
286
291
local WindowActions = require (" grapple.window_actions" )
@@ -323,11 +328,6 @@ local DEFAULT_SETTINGS = {
323
328
end , { desc = string.format (" Quick select %d" , i ) })
324
329
end
325
330
326
- -- Toggle
327
- window :map (" n" , " <s-cr>" , function ()
328
- window :perform_retain (ContainerActions .toggle_all )
329
- end , { desc = " Toggle show all" })
330
-
331
331
-- Unload
332
332
window :map (" n" , " x" , function ()
333
333
local entry = window :current_entry ()
@@ -347,6 +347,11 @@ local DEFAULT_SETTINGS = {
347
347
window :perform_close (ContainerActions .open_scopes )
348
348
end , { desc = " Go to scopes" })
349
349
350
+ -- Toggle
351
+ window :map (" n" , " g." , function ()
352
+ window :perform_retain (ContainerActions .toggle_all )
353
+ end , { desc = " Toggle show unloaded" })
354
+
350
355
-- Help
351
356
window :map (" n" , " ?" , function ()
352
357
local WindowActions = require (" grapple.window_actions" )
@@ -499,23 +504,15 @@ function Settings:scopes()
499
504
definition = { delete = true }
500
505
end
501
506
502
- definition = vim .tbl_extend (" keep" , definition , {
503
- name = name ,
504
- desc = " " ,
505
- })
506
-
507
+ definition = vim .tbl_extend (" keep" , definition , { name = name })
507
508
assert (type (definition .name ) == " string" )
508
509
509
510
table.insert (scopes , definition )
510
511
end
511
512
512
513
-- Add user-defined scopes
513
514
for name , definition in pairs (self .inner .scopes ) do
514
- definition = vim .tbl_extend (" keep" , definition , {
515
- name = name ,
516
- desc = " " ,
517
- })
518
-
515
+ definition = vim .tbl_extend (" keep" , definition , { name = name })
519
516
assert (type (definition .name ) == " string" )
520
517
521
518
if definition .fallback then
0 commit comments