Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhongjia committed Aug 10, 2024
1 parent 039a4ef commit 97d38c1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lua/LspUI/_meta.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lua/LspUI/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ local default_pos_keybind_config = {
jump_vsplit = "sv",
jump_tab = "t",
toggle_fold = "<Cr>",
next_file_entry = "J",
prev_file_entry = "K",
next_entry = "J",
prev_entry = "K",
quit = "q",
hide_main = "<leader>h",
fold_all = "w",
Expand Down
20 changes: 10 additions & 10 deletions lua/LspUI/pos_abstract.lua
Original file line number Diff line number Diff line change
Expand Up @@ -339,27 +339,27 @@ 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,
}
)

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,
}
)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 97d38c1

Please sign in to comment.