plugins.airline.settings

The configuration options for airline without the airline_ prefix.

For example, the following settings are equivialent to these :setglobal commands:

  • foo_bar = 1 -> :setglobal airline_foo_bar=1
  • hello = "world" -> :setglobal airline_hello="world"
  • some_toggle = true -> :setglobal airline_some_toggle
  • other_toggle = false -> :setglobal noairline_other_toggle

Type: attribute set of anything

Default: { }

Example:

{
  powerline_fonts = true;
  skip_empty_sections = true;
  theme = "base16";
}

Declared by:

plugins.airline.settings.detect_crypt

Enable crypt detection.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.detect_iminsert

Enable iminsert detection.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.detect_modified

Enable modified detection.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.detect_paste

Enable paste detection.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.detect_spell

Enable spell detection.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.detect_spelllang

Display spelling language when spell detection is enabled (if enough space is available).

Set to ‘flag’ to get a unicode icon of the relevant country flag instead of the ‘spelllang’ itself.

Plugin default: true

Type: null or raw lua code or boolean or value “flag” (singular enum)

Default: null

Declared by:

plugins.airline.settings.disable_statusline

Disable the Airline statusline customization globally.

This setting disables setting the ‘statusline’ option. This allows to use e.g. the tabline extension (|airline-tabline|) but keep the ‘statusline’ option totally configurable by a custom configuration.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.exclude_filenames

Define the set of filename match queries which excludes a window from having its statusline modified.

Default: see source for current list

Type: null or (list of string) or raw lua code

Default: null

Declared by:

plugins.airline.settings.exclude_filetypes

Define the set of filetypes which are excluded from having its window statusline modified.

Default: see source for current list

Type: null or (list of string) or raw lua code

Default: null

Declared by:

plugins.airline.settings.exclude_preview

Defines whether the preview window should be excluded from having its window statusline modified (may help with plugins which use the preview window heavily).

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.experimental

Enable experimental features. Currently: Enable Vim9 Script implementation.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.filetype_overrides

Define the set of names to be displayed instead of a specific filetypes.

Example:

  {
    coc-explorer =  ["CoC Explorer" ""];
    defx = ["defx" "%{b:defx.paths[0]}"];
    fugitive = ["fugitive" "%{airline#util#wrap(airline#extensions#branch#get_head(),80)}"];
    gundo = ["Gundo" "" ];
    help = ["Help" "%f"];
    minibufexpl = ["MiniBufExplorer" ""];
    startify = ["startify" ""];
    vim-plug = ["Plugins" ""];
    vimfiler = ["vimfiler" "%{vimfiler#get_status_string()}"];
    vimshell = ["vimshell" "%{vimshell#get_status_string()}"];
    vaffle = ["Vaffle" "%{b:vaffle.dir}"];
  }

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

Default: null

Declared by:

plugins.airline.settings.focuslost_inactive

Disable airline on FocusLost autocommand (e.g. when Vim loses focus).

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.highlighting_cache

Caches the changes to the highlighting groups, should therefore be faster. Set this to one, if you experience a sluggish Vim.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.inactive_alt_sep

Use alternative separators for the statusline of inactive windows.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.inactive_collapse

Determine whether inactive windows should have the left section collapsed to only the filename of that buffer.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.left_sep

The separator used on the left side.

Plugin default: ">"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.airline.settings.mode_map

Define the set of text to display for each mode.

Default: see source

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

Default: null

Declared by:

plugins.airline.settings.powerline_fonts

By default, airline will use unicode symbols if your encoding matches utf-8. If you want the powerline symbols set this variable to true.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.right_sep

The separator used on the right side.

Plugin default: "<"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.airline.settings.section_a

Configuration for this section.

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

Default: null

Declared by:

plugins.airline.settings.section_b

Configuration for this section.

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

Default: null

Declared by:

plugins.airline.settings.section_c

Configuration for this section.

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

Default: null

Declared by:

plugins.airline.settings.section_c_only_filename

Display a only file name in statusline.

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.section_x

Configuration for this section.

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

Default: null

Declared by:

plugins.airline.settings.section_y

Configuration for this section.

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

Default: null

Declared by:

plugins.airline.settings.section_z

Configuration for this section.

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

Default: null

Declared by:

plugins.airline.settings.skip_empty_sections

Do not draw separators for empty sections (only for the active window).

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.statusline_ontop

Display the statusline in the tabline (first top line).

Setting this option, allows to use the statusline option to be used by a custom function or another plugin, since airline won’t change it.

Note: This setting is experimental and works on a best effort approach. Updating the statusline might not always happen as fast as needed, but that is a limitation, that comes from Vim. airline tries to force an update if needed, but it might not always work as expected. To force updating the tabline on mode changes, call airline#check_mode() in your custom statusline setting: :set stl=%!airline#check_mode(winnr()) will correctly update the tabline on mode changes.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.stl_path_style

Display a short path in statusline.

Plugin default: "short"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.airline.settings.symbols

Customize airline symbols.

Example:

  {
    branch = "";
    colnr = " ℅:";
    readonly = "";
    linenr = " :";
    maxlinenr = "☰ ";
    dirty= "⚡";
  }

Type: null or (attribute set of string)

Default: null

Declared by:

plugins.airline.settings.symbols_ascii

By default, airline will use unicode symbols if your encoding matches utf-8. If you want to use plain ascii symbols, set this variable: >

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.airline.settings.theme

Themes are automatically selected based on the matching colorscheme. This can be overridden by defining a value.

Note: Only the dark theme is distributed with vim-airline. For more themes, checkout the vim-airline-themes repository (https://github.com/vim-airline/vim-airline-themes)

Plugin default: "dark"

Type: null or string or raw lua code

Default: null

Declared by:

plugins.airline.settings.theme_patch_func

If you want to patch the airline theme before it gets applied, you can supply the name of a function where you can modify the palette.

Example: “AirlineThemePatch”

Then, define this function using extraConfigVim:

  extraConfigVim = \'\'
    function! AirlineThemePatch(palette)
      if g:airline_theme == 'badwolf'
        for colors in values(a:palette.inactive)
          let colors[3] = 245
        endfor
      endif
    endfunction
  \'\';

Type: null or string or raw lua code

Default: null

Declared by: