Skip to content

Commit

Permalink
refactor: Reorganize keymap order
Browse files Browse the repository at this point in the history
  • Loading branch information
hedyhli committed Nov 26, 2023
1 parent 39668e5 commit c7d38ee
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lua/outline/sidebar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,29 +130,29 @@ end

function Sidebar:setup_keymaps()
for name, meth in pairs({
show_help = { require('outline.help').show_keymap_help, {} },
close = { function() self:close() end, {} },
goto_location = { '_goto_location', { true } },
peek_location = { '_goto_location', { false } },
restore_location = { '_map_follow_cursor', {} },
goto_and_close = { '_goto_and_close', {} },
down_and_jump = { '_move_and_jump', { 'down' } },
up_and_jump = { '_move_and_jump', { 'up' } },
hover_symbol = { require('outline.hover').show_hover, {} },
toggle_preview = { require('outline.preview').toggle, {} },
rename_symbol = {
providers.action, { self, 'rename_symbol', { self } }
},
code_actions = {
providers.action, { self, 'code_actions', { self } }
},
show_help = { require('outline.help').show_keymap_help, {} },
close = { function() self.view:close() end, {} },
fold_toggle = { '_toggle_fold', {} },
fold = { '_set_folded', { true } },
unfold = { '_set_folded', { false } },
fold_toggle_all = { '_toggle_all_fold', {} },
fold_all = { '_set_all_folded', { true } },
unfold_all = { '_set_all_folded', { false } },
fold_reset = { '_set_all_folded', {} },
hover_symbol = { require('outline.hover').show_hover, {} },
rename_symbol = {
providers.action, { self, 'rename_symbol', { self } }
},
code_actions = {
providers.action, { self, 'code_actions', { self } }
},
}) do
---@diagnostic disable-next-line param-type-mismatch
self:nmap(name, meth[1], meth[2])
Expand Down

0 comments on commit c7d38ee

Please sign in to comment.