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 file = vim.api.nvim_buf_get_name(0)
|
||||||
local cursor = vim.api.nvim_win_get_cursor(0)
|
local cursor = vim.api.nvim_win_get_cursor(0)
|
||||||
table.insert(bookmarks, {name = input, file = file, cursor = cursor})
|
table.insert(bookmarks, {name = input, file = file, cursor = cursor})
|
||||||
|
vim.notify("Bookmark \"" .. input .. "\" added")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@@ -82,9 +83,10 @@ function M.selectBookmark(action, on_choice)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M.deleteBookmark()
|
function M.deleteBookmark()
|
||||||
M.selectBookmark("Delete", function(_, idx)
|
M.selectBookmark("Delete", function(bookmark, idx)
|
||||||
if idx then
|
if idx then
|
||||||
table.remove(bookmarks, idx)
|
table.remove(bookmarks, idx)
|
||||||
|
vim.notify("Deleted bookmark \"".. bookmark.name .. "\"")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user