Skip to content

Commit

Permalink
feat: ✨ added bookmark_clear_all method (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatashashimoto authored May 9, 2024
1 parent 12bf1b3 commit 0540d52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ require('bookmarks').setup {
map("n","mn",bm.bookmark_next) -- jump to next mark in local buffer
map("n","mp",bm.bookmark_prev) -- jump to previous mark in local buffer
map("n","ml",bm.bookmark_list) -- show marked file list in quickfix window
map("n","mx",bm.bookmark_clear_all) -- removes all bookmarks
end
}
```
Expand Down
6 changes: 6 additions & 0 deletions lua/bookmarks/actions.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local config = require("bookmarks.config").config
local schema = require("bookmarks.config").schema
local uv = vim.loop
local Signs = require "bookmarks.signs"
local utils = require "bookmarks.util"
Expand Down Expand Up @@ -208,4 +209,9 @@ function M.saveBookmarks()
end
end

function M.bookmark_clear_all()
config.cache = schema.cache.default
M.saveBookmarks()
end

return M

0 comments on commit 0540d52

Please sign in to comment.