Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nvzone/menu
Menu plugin for neovim ( supports nested menus ) made using volt
https://github.com/nvzone/menu
lua menu neovim neovim-plugin nvchad
Last synced: 3 days ago
JSON representation
Menu plugin for neovim ( supports nested menus ) made using volt
- Host: GitHub
- URL: https://github.com/nvzone/menu
- Owner: nvzone
- License: gpl-3.0
- Created: 2024-09-11T04:55:04.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-15T07:09:08.000Z (about 1 month ago)
- Last Synced: 2025-02-16T10:11:26.416Z (4 days ago)
- Topics: lua, menu, neovim, neovim-plugin, nvchad
- Language: Lua
- Homepage:
- Size: 49.8 KB
- Stars: 501
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Menu
Menu ui for neovim ( supports nested menus )

https://github.com/user-attachments/assets/89d96170-e039-4d3d-9640-0fdc3358a833
## Install
```lua
{ "nvzone/volt" , lazy = true },
{ "nvzone/menu" , lazy = true },
```## Usage
```lua
require("menu").open(options, opts)
```
- options is a table or string, if string then it will look at the table from menus* module of this repo
- opts : { mouse = true, border = false }"### For keyboard users
- Use `h` `l` to move between windows
- Use `q` to close the window
- Press the keybind defined for menu item or scroll to it and press enter, to execute it### Examples
- Keyboard users can run the mapping when inside the menu, mouse users can click.
```lua
-- Keyboard users
vim.keymap.set("n", "", function()
require("menu").open("default")
end, {})-- mouse users + nvimtree users!
vim.keymap.set({ "n", "v" }, "", function()
require('menu.utils').delete_old_menus()vim.cmd.exec '"normal! \\"'
-- clicked buf
local buf = vim.api.nvim_win_get_buf(vim.fn.getmousepos().winid)
local options = vim.bo[buf].ft == "NvimTree" and "nvimtree" or "default"require("menu").open(options, { mouse = true })
end, {})
```Check example of [defaults menu](https://github.com/NvChad/menu/blob/main/lua/menus/default.lua) to see know syntax of options table.
## :gift_heart: Support
If you like NvChad or its plugins and would like to support it via donation
[](https://ko-fi.com/siduck)
[](https://paypal.me/siduck13)
[](https://www.buymeacoffee.com/siduck)
[](https://www.patreon.com/siduck)