diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 0b0cf804..21e655d2 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -35,6 +35,7 @@ [yanky.nvim]: https://github.com/gbprod/yanky.nvim [yazi.nvim]: https://github.com/mikavilpas/yazi.nvim [snacks.nvim]: https://github.com/folke/snacks.nvim +[colorful-menu.nvim]: https://github.com/xzbdmw/colorful-menu.nvim [oil.nvim]: https://github.com/stevearc/oil.nvim [hunk.nvim]: https://github.com/julienvincent/hunk.nvim [undotree]: https://github.com/mbbill/undotree @@ -95,9 +96,10 @@ - Lazyload Lspsaga and remove default keybindings for it. +- Add [colorful-menu.nvim] to enhance the completion menus, with optional + integration for blink-cmp and nvim-cmp - Add [oil.nvim] as an alternative file explorer. It will be available under `vim.utility.oil-nvim`. - - Add `vim.diagnostics` to interact with Neovim's diagnostics module. Available options for `vim.diagnostic.config()` can now be customized through the [](#opt-vim.diagnostics.config) in nvf. diff --git a/modules/plugins/ui/colorful-menu-nvim/colorful-menu-nvim.nix b/modules/plugins/ui/colorful-menu-nvim/colorful-menu-nvim.nix new file mode 100644 index 00000000..075b3d9a --- /dev/null +++ b/modules/plugins/ui/colorful-menu-nvim/colorful-menu-nvim.nix @@ -0,0 +1,9 @@ +{lib, ...}: let + inherit (lib.options) mkEnableOption; + inherit (lib.nvim.types) mkPluginSetupOption; +in { + options.vim.ui.colorful-menu-nvim = { + enable = mkEnableOption "treesitter highlighted completion menus [colorful-menu.nvim]"; + setupOpts = mkPluginSetupOption "colorful-menu-nvim" {}; + }; +} diff --git a/modules/plugins/ui/colorful-menu-nvim/config.nix b/modules/plugins/ui/colorful-menu-nvim/config.nix new file mode 100644 index 00000000..da300274 --- /dev/null +++ b/modules/plugins/ui/colorful-menu-nvim/config.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + ... +}: let + inherit (lib.modules) mkIf; + inherit (lib.nvim.dag) entryAnywhere; + inherit (lib.nvim.lua) toLuaObject; + + cfg = config.vim.ui.colorful-menu-nvim; +in { + config = mkIf cfg.enable { + vim = { + startPlugins = ["colorful-menu-nvim"]; + pluginRC.colorful-menu-nvim = entryAnywhere '' + require("colorful-menu").setup(${toLuaObject cfg.setupOpts}) + ''; + }; + }; +} diff --git a/modules/plugins/ui/colorful-menu-nvim/default.nix b/modules/plugins/ui/colorful-menu-nvim/default.nix new file mode 100644 index 00000000..198e844e --- /dev/null +++ b/modules/plugins/ui/colorful-menu-nvim/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./config.nix + ./colorful-menu-nvim.nix + ]; +} diff --git a/modules/plugins/ui/default.nix b/modules/plugins/ui/default.nix index e9489e9b..50112650 100644 --- a/modules/plugins/ui/default.nix +++ b/modules/plugins/ui/default.nix @@ -1,14 +1,15 @@ { imports = [ - ./noice - ./modes - ./nvim-ufo - ./notifications - ./smartcolumn - ./colorizer - ./illuminate - ./breadcrumbs ./borders + ./breadcrumbs + ./colorful-menu-nvim + ./colorizer ./fastaction + ./illuminate + ./modes + ./noice + ./notifications + ./nvim-ufo + ./smartcolumn ]; } diff --git a/npins/sources.json b/npins/sources.json index b94cd8e0..010dd3ce 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -286,6 +286,19 @@ "url": "https://github.com/gorbit99/codewindow.nvim/archive/a8e175043ce3baaa89e0a6b5171bcd920aab3dad.tar.gz", "hash": "12nsdynpym15fl9qwjzlzhxr2mbpa0l6sp2r1rrc300jr59q0gkr" }, + "colorful-menu-nvim": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "xzbdmw", + "repo": "colorful-menu.nvim" + }, + "branch": "master", + "submodules": false, + "revision": "f80feb8a6706f965321aff24d0ed3849f02a7f77", + "url": "https://github.com/xzbdmw/colorful-menu.nvim/archive/f80feb8a6706f965321aff24d0ed3849f02a7f77.tar.gz", + "hash": "1rj6yy7gchdyynhd13l35vhmn8npldmgn4vam9gv244mywpz3flw" + }, "comment-nvim": { "type": "Git", "repository": {