plugins.noice.settings

Options provided to the require('noice').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  callback = {
    __raw = ''
      function()
        print('nixvim')
      end
    '';
  };
  foo_bar = 42;
  hostname = "localhost:8080";
}

Declared by:

plugins.noice.settings.commands

You can add any custom commands that will be available with :Noice command.

Type: null or (attribute set of (anything or raw lua code))

Default: null

Plugin default:

{
  errors = {
    filter = {
      error = true;
    };
    filter_opts = {
      reverse = true;
    };
    opts = {
      enter = true;
      format = "details";
    };
    view = "popup";
  };
  history = {
    filter = {
      any = [
        {
          event = "notify";
        }
        {
          error = true;
        }
        {
          warning = true;
        }
        {
          event = "msg_show";
          kind = [
            ""
          ];
        }
        {
          event = "lsp";
          kind = "message";
        }
      ];
    };
    opts = {
      enter = true;
      format = "details";
    };
    view = "split";
  };
  last = {
    filter = {
      any = [
        {
          event = "notify";
        }
        {
          error = true;
        }
        {
          warning = true;
        }
        {
          event = "msg_show";
          kind = [
            ""
          ];
        }
        {
          event = "lsp";
          kind = "message";
        }
      ];
    };
    filter_opts = {
      count = 1;
    };
    opts = {
      enter = true;
      format = "details";
    };
    view = "popup";
  };
}

Declared by:

plugins.noice.settings.format

Formatters are used in format definitions.

Noice includes the following formatters:

  • level: message level with optional icon and hl_group per level
  • text: any text with optional hl_group
  • title: message title with optional hl_group
  • event: message event with optional hl_group
  • kind: message kind with optional hl_group
  • date: formatted date with optional date format string
  • message: message content itself with optional hl_group to override message highlights
  • confirm: only useful for confirm messages. Will format the choices as buttons.
  • cmdline: will render the cmdline in the message that generated the message.
  • progress: progress bar used by lsp progress
  • spinner: spinners used by lsp progress
  • data: render any custom data from Message.opts. Useful in combination with the opts passed to vim.notify

Type: null or (attribute set of (anything or raw lua code))

Default: null

Plugin default: { }

Declared by:

plugins.noice.settings.presets

You can enable a preset by setting it to true, or a table that will override the preset config.

You can also add custom presets that you can enable/disable with enabled=true.

Type: null or boolean or anything

Default: null

Plugin default:

{
  bottom_search = false;
  command_palette = false;
  inc_rename = false;
  long_message_to_split = false;
  lsp_doc_border = false;
}

Declared by:

plugins.noice.settings.redirect

Default options for require('noice').redirect.

Type: null or (attribute set of (anything or raw lua code))

Default: null

Plugin default:

{
  filter = {
    event = "msg_show";
  };
  view = "popup";
}

Declared by:

plugins.noice.settings.routes

Route options can be any of the view options or skip or stop.

A route has a filter, view and optional opts attribute.

  • view: one of the views (built-in or custom)
  • filter a filter for messages matching this route
  • opts: options for the view and the route

Type: null or (list of ((attribute set of anything) or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.noice.settings.status

Noice comes with the following statusline components:

  • ruler
  • message: last line of the last message (event=show_msg)
  • command: showcmd
  • mode: showmode (@recording messages)
  • search: search count messages

Type: null or (attribute set of (anything or raw lua code))

Default: null

Plugin default: { }

Declared by:

plugins.noice.settings.throttle

How frequently does Noice need to check for ui updates?

This has no effect when in blocking mode.

Type: null or signed integer or floating point number or raw lua code

Default: null

Plugin default: 1000 / 30

Declared by:

plugins.noice.settings.views

A view is a combination of a backend and options.

Noice comes with the following built-in backends:

  • popup: powered by nui.nvim
  • split: powered by nui.nvim
  • notify: powered by nvim-notify
  • virtualtext: shows the message as virtualtext (for example for search_count)
  • mini: similar to notifier.nvim & fidget.nvim
  • notify_send: generate a desktop notification

Type: null or (attribute set of (anything or raw lua code))

Default: null

Plugin default: { }

Declared by: