Important All the credits for the idea for the plugin goes to ThePrimegean and his plugin harpoon. I highly suggest you to watch is vimconf video to understand the usage of this plugin.
Warning This plugin is not stable. Is expected changes in the API. If you experience bugs open an issue
- No opt-out dependencies
- Take advantage of native neovim features
- Feature compatible with harpoon
- Support anything other than marking file
Harpoon is great and all but as a lot of features that I don't really need
and depends on plenary.nvim
. This plugin focus on minimalism, do the minimum
set of features to be usable and use only neovim standard functions.
Using your favorite Package manager:
"saccarosium/neomarks"
Put it directly in your config:
curl https://raw.githubusercontent.com/saccarosium/neomarks/main/lua/neomarks.lua -o "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim/lua/neomarks.lua
Call the setup
function (the following are the defaults):
require("neomarks").setup({
storagefile = vim.fn.stdpath('data') .. "/neomarks.json",
menu = {
title = "Neomarks",
title_pos = "center",
border = "rounded",
width = 60,
height = 10,
}
})
Now you can remap as you wish the following functions:
require("neomarks").mark_file() -- Mark file
require("neomarks").menu_toggle() -- Toggle the UI
require("neomarks").jump_to(<number>) -- Jump to specific index
Note For enabling branch specific files you need to: or install some sort of git integration plugin, that exposes a function to get the current branch name, or build a function on your own. It is preferable to achive this using a plugin. Some options are: gitsigns.nvim or vim-fugitive.
To enable the feature you need to pass a function that returns the current branch name.
git_branch = vim.fn["FugitiveHead"], -- For vim-fugitive
git_branch = function() return vim.api.nvim_buf_get_var(0, "gitsigns_head") end, -- For gitsigns.nvim
git_branch = function() ... end, -- For custom function that returns branch name
- Support branch specific marks
- Mark specific buffer symbol using tree-sitter
Keys | Action |
---|---|
<CR> , e , E |
edit file under the cursor |
<C-c> , <ESC> , q |
close UI |