Skip to content
项目

关于

使用 volt 构建的 Neovim 菜单插件(支持嵌套菜单)

开发工具

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Menu

Menu ui for neovim ( supports nested menus )

image image image

https://github.com/user-attachments/assets/89d96170-e039-4d3d-9640-0fdc3358a833

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", "v" }, "<RightMouse>", function()
  require('menu.utils').delete_old_menus()

  vim.cmd.exec '"normal! \\<RightMouse>"'

  -- 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 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

kofi paypal buymeacoffee patreon

探索相关项目

加载中…