Go to file
2022-07-03 22:57:15 +08:00
lua feat(mark): add jump to prev or next mark 2022-07-03 22:32:26 +08:00
.gitignore feat!: update setup,add read/write marks json 2022-07-01 16:28:09 +08:00
LICENSE Initial commit 2022-06-30 11:39:46 +08:00
README.md docs: add some key map instructions 2022-07-03 22:57:15 +08:00

bookmarks.nvim

A Bookmarks Plugin With Global File Store For Neovim Written In Lua.

Requirements

  • Neovim >= 0.7.0

Installation

With packer.nvim:

use {
'tomasky/bookmarks.nvim',
-- tag = 'release' -- To use the latest release
}

Usage

For basic setup with all default configs using packer.nvim

use {
  'tomasky/bookmarks.nvim',
  config = function()
    require('bookmarks').setup()
  end
}

Here is an example with most of the default settings:

require('bookmarks').setup {
  save_file = "$HOME/.bookmarks", -- bookmarks save file path
  on_attach = function(bufnr)
    local bm = require "bookmarks"
    local map = vim.keymap.set
    map("n","mm",bm.bookmark_toggle) -- add or remove bookmark at current line
    map("n","mi",bm.bookmark_ann) -- add mark annotation at current line
    map("n","mc",bm.bookmark_clean) -- clean all marks in local buffer
    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
  end
}

Credits