refactor: remove unused parameter (#1044)
This commit is contained in:
@@ -53,7 +53,7 @@ WIP.completion = function(opts)
|
|||||||
previewer = previewers.help,
|
previewer = previewers.help,
|
||||||
})
|
})
|
||||||
|
|
||||||
reference_picker:find {}
|
reference_picker:find()
|
||||||
end
|
end
|
||||||
|
|
||||||
WIP.reloader = function(opts)
|
WIP.reloader = function(opts)
|
||||||
@@ -63,13 +63,13 @@ WIP.reloader = function(opts)
|
|||||||
prompt = "Packages",
|
prompt = "Packages",
|
||||||
finder = finders.new_table {
|
finder = finders.new_table {
|
||||||
results = vim.tbl_keys(package.loaded),
|
results = vim.tbl_keys(package.loaded),
|
||||||
entry_maker = make_entry.gen_from_string(opts),
|
entry_maker = make_entry.gen_from_string(),
|
||||||
},
|
},
|
||||||
sorter = sorters.get_generic_fuzzy_sorter(),
|
sorter = sorters.get_generic_fuzzy_sorter(),
|
||||||
|
|
||||||
attach_mappings = function(prompt_bufnr, map)
|
attach_mappings = function(prompt_bufnr, map)
|
||||||
local reload_package = function()
|
local reload_package = function()
|
||||||
local selection = action_state.get_selected_entry(prompt_bufnr)
|
local selection = action_state.get_selected_entry()
|
||||||
|
|
||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
|
|
||||||
|
|||||||
@@ -297,13 +297,13 @@ function actions.close(prompt_bufnr)
|
|||||||
end
|
end
|
||||||
|
|
||||||
actions.edit_command_line = function(prompt_bufnr)
|
actions.edit_command_line = function(prompt_bufnr)
|
||||||
local entry = action_state.get_selected_entry(prompt_bufnr)
|
local entry = action_state.get_selected_entry()
|
||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
a.nvim_feedkeys(a.nvim_replace_termcodes(":" .. entry.value, true, false, true), "t", true)
|
a.nvim_feedkeys(a.nvim_replace_termcodes(":" .. entry.value, true, false, true), "t", true)
|
||||||
end
|
end
|
||||||
|
|
||||||
actions.set_command_line = function(prompt_bufnr)
|
actions.set_command_line = function(prompt_bufnr)
|
||||||
local entry = action_state.get_selected_entry(prompt_bufnr)
|
local entry = action_state.get_selected_entry()
|
||||||
|
|
||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
vim.fn.histadd("cmd", entry.value)
|
vim.fn.histadd("cmd", entry.value)
|
||||||
@@ -311,20 +311,20 @@ actions.set_command_line = function(prompt_bufnr)
|
|||||||
end
|
end
|
||||||
|
|
||||||
actions.edit_search_line = function(prompt_bufnr)
|
actions.edit_search_line = function(prompt_bufnr)
|
||||||
local entry = action_state.get_selected_entry(prompt_bufnr)
|
local entry = action_state.get_selected_entry()
|
||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
a.nvim_feedkeys(a.nvim_replace_termcodes("/" .. entry.value, true, false, true), "t", true)
|
a.nvim_feedkeys(a.nvim_replace_termcodes("/" .. entry.value, true, false, true), "t", true)
|
||||||
end
|
end
|
||||||
|
|
||||||
actions.set_search_line = function(prompt_bufnr)
|
actions.set_search_line = function(prompt_bufnr)
|
||||||
local entry = action_state.get_selected_entry(prompt_bufnr)
|
local entry = action_state.get_selected_entry()
|
||||||
|
|
||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
a.nvim_feedkeys(a.nvim_replace_termcodes("/" .. entry.value .. "<CR>", true, false, true), "t", true)
|
a.nvim_feedkeys(a.nvim_replace_termcodes("/" .. entry.value .. "<CR>", true, false, true), "t", true)
|
||||||
end
|
end
|
||||||
|
|
||||||
actions.edit_register = function(prompt_bufnr)
|
actions.edit_register = function(prompt_bufnr)
|
||||||
local entry = action_state.get_selected_entry(prompt_bufnr)
|
local entry = action_state.get_selected_entry()
|
||||||
local picker = action_state.get_current_picker(prompt_bufnr)
|
local picker = action_state.get_current_picker(prompt_bufnr)
|
||||||
|
|
||||||
vim.fn.inputsave()
|
vim.fn.inputsave()
|
||||||
@@ -346,7 +346,7 @@ actions.edit_register = function(prompt_bufnr)
|
|||||||
end
|
end
|
||||||
|
|
||||||
actions.paste_register = function(prompt_bufnr)
|
actions.paste_register = function(prompt_bufnr)
|
||||||
local entry = action_state.get_selected_entry(prompt_bufnr)
|
local entry = action_state.get_selected_entry()
|
||||||
|
|
||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
|
|
||||||
@@ -358,7 +358,7 @@ actions.paste_register = function(prompt_bufnr)
|
|||||||
end
|
end
|
||||||
|
|
||||||
actions.run_builtin = function(prompt_bufnr)
|
actions.run_builtin = function(prompt_bufnr)
|
||||||
local entry = action_state.get_selected_entry(prompt_bufnr)
|
local entry = action_state.get_selected_entry()
|
||||||
|
|
||||||
actions._close(prompt_bufnr, true)
|
actions._close(prompt_bufnr, true)
|
||||||
if string.match(entry.text, " : ") then
|
if string.match(entry.text, " : ") then
|
||||||
@@ -381,7 +381,7 @@ end
|
|||||||
|
|
||||||
-- TODO: Think about how to do this.
|
-- TODO: Think about how to do this.
|
||||||
actions.insert_value = function(prompt_bufnr)
|
actions.insert_value = function(prompt_bufnr)
|
||||||
local entry = action_state.get_selected_entry(prompt_bufnr)
|
local entry = action_state.get_selected_entry()
|
||||||
|
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
actions.close(prompt_bufnr)
|
actions.close(prompt_bufnr)
|
||||||
|
|||||||
Reference in New Issue
Block a user