From e7865eaaa244a60d3ee745365f5a18bc673aa708 Mon Sep 17 00:00:00 2001 From: Pranav Rao <56097527+pranavrao145@users.noreply.github.com> Date: Fri, 6 May 2022 12:38:30 -0400 Subject: [PATCH 1/2] chore(dev): added Makefile and fixed lint workflow --- .github/workflows/lint.yml | 2 +- Makefile | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e2c25fd..46759d5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,4 +15,4 @@ jobs: sudo luarocks install luacheck - name: Lint - run: luacheck lua/harpoon + run: luacheck lua/ --globals vim diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5da43dc --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +fmt: + echo "===> Formatting" + stylua lua/ --config-path=.stylua.toml + +lint: + echo "===> Linting" + luacheck lua/ --globals vim + +pr-ready: fmt lint From 15bf2c65c223ba944ee465fb68bd12848f48f07b Mon Sep 17 00:00:00 2001 From: Pranav Rao <56097527+pranavrao145@users.noreply.github.com> Date: Fri, 6 May 2022 12:46:06 -0400 Subject: [PATCH 2/2] chore(lint): get rid of it, all of it --- lua/telescope/_extensions/marks.lua | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lua/telescope/_extensions/marks.lua b/lua/telescope/_extensions/marks.lua index 2423304..5594c29 100644 --- a/lua/telescope/_extensions/marks.lua +++ b/lua/telescope/_extensions/marks.lua @@ -1,11 +1,8 @@ -local action_set = require("telescope.actions.set") local action_state = require("telescope.actions.state") local action_utils = require("telescope.actions.utils") local entry_display = require("telescope.pickers.entry_display") local finders = require("telescope.finders") local pickers = require("telescope.pickers") -local previewers = require("telescope.previewers") -local sorters = require("telescope.sorters") local conf = require("telescope.config").values local harpoon = require("harpoon") local harpoon_mark = require("harpoon.mark") @@ -34,13 +31,12 @@ local generate_new_finder = function() { remaining = true }, }, }) - local make_display = function(entry) + local make_display = function() return displayer({ tostring(entry.index), line, }) end - local line = entry.filename .. ":" .. entry.row .. ":" .. entry.col return { value = entry, ordinal = line, @@ -75,9 +71,10 @@ local delete_harpoon_mark = function(prompt_bufnr) end) return results end + local selections = get_selections() - for _, selection in ipairs(selections) do - harpoon_mark.rm_file(selection.filename) + for _, current_selection in ipairs(selections) do + harpoon_mark.rm_file(current_selection.filename) end local current_picker = action_state.get_current_picker(prompt_bufnr) @@ -107,8 +104,9 @@ return function(opts) attach_mappings = function(_, map) map("i", "", delete_harpoon_mark) map("n", "", delete_harpoon_mark) - map("i", "", move_mark_up) - map("n", "", move_mark_up) + -- TODO: implement move_mark_up + -- map("i", "", move_mark_up) + -- map("n", "", move_mark_up) map("i", "", move_mark_down) map("n", "", move_mark_down) return true