diff --git a/lua/LspUI/_meta.lua b/lua/LspUI/_meta.lua index 8aed282..3f918a2 100644 --- a/lua/LspUI/_meta.lua +++ b/lua/LspUI/_meta.lua @@ -35,7 +35,7 @@ --- @field filter { whitelist: string[]?, blacklist:string[]? }? the filter of blacklist and whitelist, should be filetype list -- this is just for some keybind like definition, type definition, declaration, reference, implementation ---- @alias LspUI_pos_keybind_config { secondary: { jump: string?, jump_tab: string?, jump_split: string?, jump_vsplit: string?, toggle_fold: string?, next_file_entry: string?, prev_file_entry: string?, quit:string?, hide_main:string?, fold_all:string?, expand_all:string?, enter: string? }?, main: { back: string?, hide_secondary: string? }? , transparency: number? } +--- @alias LspUI_pos_keybind_config { secondary: { jump: string?, jump_tab: string?, jump_split: string?, jump_vsplit: string?, toggle_fold: string?, next_entry: string?, prev_entry: string?, quit:string?, hide_main:string?, fold_all:string?, expand_all:string?, enter: string? }?, main: { back: string?, hide_secondary: string? }? , transparency: number? } -- TODO: change this -- TODO: replace above LspUI_pos_keybind_config with LspUI_pos_config diff --git a/lua/LspUI/config.lua b/lua/LspUI/config.lua index d72bd36..90cd641 100644 --- a/lua/LspUI/config.lua +++ b/lua/LspUI/config.lua @@ -108,8 +108,8 @@ local default_pos_keybind_config = { jump_vsplit = "sv", jump_tab = "t", toggle_fold = "", - next_file_entry = "J", - prev_file_entry = "K", + next_entry = "J", + prev_entry = "K", quit = "q", hide_main = "h", fold_all = "w", diff --git a/lua/LspUI/pos_abstract.lua b/lua/LspUI/pos_abstract.lua index 67d3636..a89ca30 100644 --- a/lua/LspUI/pos_abstract.lua +++ b/lua/LspUI/pos_abstract.lua @@ -339,13 +339,13 @@ local secondary_view_keybind = function() api.nvim_buf_set_keymap( M.secondary_view_buffer(), "n", - config.options.pos_keybind.secondary.next_file_entry, + config.options.pos_keybind.secondary.next_entry, "", { nowait = true, noremap = true, callback = function() - M.action.next_file_entry() + M.action.next_entry() end, } ) @@ -353,13 +353,13 @@ local secondary_view_keybind = function() api.nvim_buf_set_keymap( M.secondary_view_buffer(), "n", - config.options.pos_keybind.secondary.prev_file_entry, + config.options.pos_keybind.secondary.prev_entry, "", { nowait = true, noremap = true, callback = function() - M.action.prev_file_entry() + M.action.prev_entry() end, } ) @@ -1046,7 +1046,7 @@ local action_toggle_fold = function() end -- next file entry -local action_next_file_entry = function() +local action_next_entry = function() -- when current_item not exist, just return if not current_item.uri then return @@ -1071,7 +1071,7 @@ local action_next_file_entry = function() end -- prev file entry -local action_prev_file_entry = function() +local action_prev_entry = function() -- when current_item not exist, just return if not current_item.uri then return @@ -1210,11 +1210,11 @@ M.action = { toggle_fold = function() action_toggle_fold() end, - next_file_entry = function() - action_next_file_entry() + next_entry = function() + action_next_entry() end, - prev_file_entry = function() - action_prev_file_entry() + prev_entry = function() + action_prev_entry() end, enter_main = function() action_enter_main()