colorful-menu

URL: https://github.com/xzbdmw/colorful-menu.nvim/

Maintainers: Gaetan Lepage


To use this in nvim-cmp for example,

plugins.cmp.settings.formatting.format.__raw = \'\'
  function(entry, vim_item)
    local highlights_info = require("colorful-menu").cmp_highlights(entry)

    -- highlight_info is nil means we are missing the ts parser, it's
    -- better to fallback to use default `vim_item.abbr`. What this plugin
    -- offers is two fields: `vim_item.abbr_hl_group` and `vim_item.abbr`.
    if highlights_info ~= nil then
        vim_item.abbr_hl_group = highlights_info.highlights
        vim_item.abbr = highlights_info.text
    end

    return vim_item
  end
\'\';

Learn more in the README.

plugins.colorful-menu.enable

Whether to enable colorful-menu.nvim.

Type: boolean

Default: false

Example: true

Declared by:

plugins.colorful-menu.package

The colorful-menu.nvim package to use.

Type: package

Default: pkgs.vimPlugins.colorful-menu-nvim

Declared by:

plugins.colorful-menu.autoLoad

Whether to automatically load colorful-menu.nvim when neovim starts.

Type: boolean

Default: false when lazy-loading is enabled.

Example: false

Declared by:

plugins.colorful-menu.settings

Options provided to the require('colorful-menu').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  fallback_highlight = "@variable";
  ls = {
    fallback = true;
    lua_ls = {
      arguments_hl = "@comment";
    };
    pyright = {
      extra_info_hl = "@comment";
    };
  };
  max_width = 60;
}

Declared by: