Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/comfysage/shelf.nvim
:books: a bookmarks manager for chaivim.
https://github.com/comfysage/shelf.nvim
chaivim neovim neovim-plugin nvim nvim-lua nvim-plugin
Last synced: 27 days ago
JSON representation
:books: a bookmarks manager for chaivim.
- Host: GitHub
- URL: https://github.com/comfysage/shelf.nvim
- Owner: comfysage
- Created: 2023-12-30T13:05:21.000Z (about 1 year ago)
- Default Branch: mega
- Last Pushed: 2024-06-24T13:42:02.000Z (7 months ago)
- Last Synced: 2024-06-24T21:54:13.183Z (7 months ago)
- Topics: chaivim, neovim, neovim-plugin, nvim, nvim-lua, nvim-plugin
- Language: Lua
- Homepage:
- Size: 84 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shelf
:books: a bookmarks manager for chaivim.
## :sparkles: Features
open the bufferlist:
```lua
require('shelf.ui').open()
```make changes by editing the buffer, apply them with = or quit
without saving changes with esc.
the currently highlighted list item can be opened with enter or:```lua
bufferlist:open(1) -- open item at index 1
```## :lock: requirements
- Neovim `>= 0.10.0`
- [yosu.nvim](https://github.com/comfysage/yosu.nvim)## :package: installation
shelf can be installed by adding _this_ to your `lua/plugins/init.lua`.
```lua
{
'comfysage/shelf.nvim',
dependencies = {'comfysage/yosu.nvim'},
opts = {},
config = function(_, opts)
require 'shelf'.setup(opts)-- toggle shelf ui
keymaps.normal['p'] = {
function()
require('shelf.ui').open()
end,
'show bufferlist',
}
end,
}
```## :gear: configuration
below is the default shelf configuration.
```lua
{
opts = {
-- cache file where bufferlists are saved
cache_file = vim.fn.stdpath 'state' .. '/shelf.list.json',
-- mappings for shelf ui
mappings = {
-- close the window
close = 'q',
-- close without applying changes
quit = '',
-- open current item
open = '',
-- apply buffer edits
apply = '=',
-- reset buffer edits
reset = '',
},
ui = {
size = {
-- size fields can be either an absolute integer size or a number between 0 and 1
-- window is 90 characters wide
width = 90,
-- max window height is 90% of editor height
height = 0.9,
},
},
}
}
```## credits
the project was mainly inspired by
[harpoon](https://github.com/ThePrimeagen/harpoon/tree/harpoon2) and the keymap
behavior was inspired by
[mini.files](https://github.com/echasnovski/mini.files)