add bookmarks

This commit is contained in:
2025-10-05 21:42:01 +02:00
parent 4be1a76578
commit ca5d985868

View File

@@ -0,0 +1,27 @@
return {
'tomasky/bookmarks.nvim',
event = { 'BufReadPre', 'BufNewFile' },
config = function()
require('bookmarks').setup {
-- sign_priority = 8,
save_file = vim.fn.expand '$HOME/.bookmarks',
keywords = {
['@t'] = '☑️ ',
['@w'] = '⚠️ ',
['@f'] = '',
['@n'] = '',
},
on_attach = function(bufnr)
local bm = require 'bookmarks'
local map = vim.keymap.set
map('n', 'mm', bm.bookmark_toggle, { buffer = bufnr })
map('n', 'mi', bm.bookmark_ann, { buffer = bufnr })
map('n', 'mc', bm.bookmark_clean, { buffer = bufnr })
map('n', 'mn', bm.bookmark_next, { buffer = bufnr })
map('n', 'mp', bm.bookmark_prev, { buffer = bufnr })
map('n', 'ml', bm.bookmark_list, { buffer = bufnr })
map('n', 'mx', bm.bookmark_clear_all, { buffer = bufnr })
end,
}
end,
}