Skip to content
/ menu Public

Menu plugin for neovim ( supports nested menus ) made using volt

License

Notifications You must be signed in to change notification settings

nvzone/menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

Menu

Menu ui for neovim ( supports nested menus )

image image image

simplescreenrecorder-2024-10-05_19.06.12.mp4

Install

{ "nvzone/volt" , lazy = true },
{ "nvzone/menu" , lazy = true },

Usage

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.
-- Keyboard users
vim.keymap.set("n", "<C-t>", function()
  require("menu").open("default")
end, {})

-- mouse users + nvimtree users!
vim.keymap.set("n", "<RightMouse>", function()
  vim.cmd.exec '"normal! \\<RightMouse>"'

  local options = vim.bo.ft == "NvimTree" and "nvimtree" or "default"
  require("menu").open(options, { mouse = true })
end, {})

Check example of defaults menu to see know syntax of options table.

💝 Support

If you like NvChad or its plugins and would like to support it via donation

kofi paypal buymeacoffee patreon