Notify about addition and deletion of bookmarks
This commit is contained in:
@@ -69,6 +69,7 @@ function M.addBookmark()
|
||||
local file = vim.api.nvim_buf_get_name(0)
|
||||
local cursor = vim.api.nvim_win_get_cursor(0)
|
||||
table.insert(bookmarks, {name = input, file = file, cursor = cursor})
|
||||
vim.notify("Bookmark \"" .. input .. "\" added")
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -82,9 +83,10 @@ function M.selectBookmark(action, on_choice)
|
||||
end
|
||||
|
||||
function M.deleteBookmark()
|
||||
M.selectBookmark("Delete", function(_, idx)
|
||||
M.selectBookmark("Delete", function(bookmark, idx)
|
||||
if idx then
|
||||
table.remove(bookmarks, idx)
|
||||
vim.notify("Deleted bookmark \"".. bookmark.name .. "\"")
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user