chore(lint): get rid of it, all of it

This commit is contained in:
Pranav Rao 2022-05-06 12:46:06 -04:00
parent e7865eaaa2
commit 15bf2c65c2

View File

@ -1,11 +1,8 @@
local action_set = require("telescope.actions.set")
local action_state = require("telescope.actions.state") local action_state = require("telescope.actions.state")
local action_utils = require("telescope.actions.utils") local action_utils = require("telescope.actions.utils")
local entry_display = require("telescope.pickers.entry_display") local entry_display = require("telescope.pickers.entry_display")
local finders = require("telescope.finders") local finders = require("telescope.finders")
local pickers = require("telescope.pickers") local pickers = require("telescope.pickers")
local previewers = require("telescope.previewers")
local sorters = require("telescope.sorters")
local conf = require("telescope.config").values local conf = require("telescope.config").values
local harpoon = require("harpoon") local harpoon = require("harpoon")
local harpoon_mark = require("harpoon.mark") local harpoon_mark = require("harpoon.mark")
@ -34,13 +31,12 @@ local generate_new_finder = function()
{ remaining = true }, { remaining = true },
}, },
}) })
local make_display = function(entry) local make_display = function()
return displayer({ return displayer({
tostring(entry.index), tostring(entry.index),
line, line,
}) })
end end
local line = entry.filename .. ":" .. entry.row .. ":" .. entry.col
return { return {
value = entry, value = entry,
ordinal = line, ordinal = line,
@ -75,9 +71,10 @@ local delete_harpoon_mark = function(prompt_bufnr)
end) end)
return results return results
end end
local selections = get_selections() local selections = get_selections()
for _, selection in ipairs(selections) do for _, current_selection in ipairs(selections) do
harpoon_mark.rm_file(selection.filename) harpoon_mark.rm_file(current_selection.filename)
end end
local current_picker = action_state.get_current_picker(prompt_bufnr) local current_picker = action_state.get_current_picker(prompt_bufnr)
@ -107,8 +104,9 @@ return function(opts)
attach_mappings = function(_, map) attach_mappings = function(_, map)
map("i", "<c-d>", delete_harpoon_mark) map("i", "<c-d>", delete_harpoon_mark)
map("n", "<c-d>", delete_harpoon_mark) map("n", "<c-d>", delete_harpoon_mark)
map("i", "<c-p>", move_mark_up) -- TODO: implement move_mark_up
map("n", "<c-p>", move_mark_up) -- map("i", "<c-p>", move_mark_up)
-- map("n", "<c-p>", move_mark_up)
map("i", "<c-n>", move_mark_down) map("i", "<c-n>", move_mark_down)
map("n", "<c-n>", move_mark_down) map("n", "<c-n>", move_mark_down)
return true return true