From e0a7d5bfcb18d7817dc1bea00e749a2e7e504f95 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 31 Dec 2021 18:10:45 +0600 Subject: [PATCH] chore: generated vimdoc (#517) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- doc/lualine.txt | 175 ++++++++++++++++++++++++++---------------------- 1 file changed, 96 insertions(+), 79 deletions(-) diff --git a/doc/lualine.txt b/doc/lualine.txt index 2fcb854..1ec9753 100644 --- a/doc/lualine.txt +++ b/doc/lualine.txt @@ -170,7 +170,7 @@ how to do it <./CONTRIBUTING.md>. > local custom_gruvbox = require'lualine.themes.gruvbox' -- Change the background of lualine_c section for normal mode - custom_gruvbox.normal.c.bg = '#112233' -- rgb colors are supported + custom_gruvbox.normal.c.bg = '#112233' -- RGB colors are supported require'lualine'.setup{ options = { theme = custom_gruvbox }, ... @@ -344,13 +344,13 @@ in component. > options = { - theme = 'auto', -- lualine theme + theme = 'auto', -- lualine theme component_separators = {left = '', right = ''}, section_separators = {left = '', right = ''}, - disabled_filetypes = {}, -- filetypes to disable lualine on - always_divide_middle = true, -- When true left_sections (a,b,c) can't - -- take over entiee statusline even - -- when none of section x, y, z is present. + disabled_filetypes = {}, -- Filetypes to disable lualine for. + always_divide_middle = true, -- When set to true, left sections i.e. 'a','b' and 'c' + -- can't take over the entire statusline even + -- if neither of 'x', 'y' or 'z' are present. } < @@ -367,40 +367,51 @@ General component options These are options that control behavior lualine_a = { { 'mode', - icons_enabled = true, -- displays icons in alongside component - icon = nil, -- displays icon in front of the component + icons_enabled = true, -- Enables the display of icons alongside the component. + icon = nil, -- Defines the icon to be displayed in front of the component. + separator = nil, -- Determines what separator to use for the component. - -- when a string is given it's treated as component_separator. - -- When a table is given it's treated as section_separator. - -- This options can be used to set colored separators - -- arround component. Option need to be set like - -- `separator = { left = '', right = ''}`. - -- Where left will be placed in left side of component - -- and right will be placed in right side of component - -- Passing empty string disables that separator - cond = nil, -- condition function, component is loaded when function returns true - -- custom color for the component in format - -- here '|' refers to or meaning a different acceptable format for that placeholder + -- When a string is provided it's treated as component_separator. + -- When a table is provided it's treated as section_separator. + -- These options can be used to set colored separators + -- around a component. + -- + -- The options need to be set like: + -- separator = { left = '', right = ''} + -- + -- Where left will be placed on left side of component, + -- and right will be placed on its right. + -- Passing an empty string disables the separator. + + cond = nil, -- Condition function, the component is loaded when the function returns `true`. + + -- Custom color for the component in format + -- here, '|' refers to 'or', meaning a different acceptable format for that placeholder e.g.: -- 'highlight_group_name' | {fg = '#rrggbb'|cterm_value(0-255)|'color_name(red)', bg= '#rrggbb', gui='style'} - -- Note: all other color options including themes accept like diff_color same color values - -- Example - -- color = {fg = '#ffaa88', bg = 'grey', gui='italic,bold'}, - -- color = {fg = 204} -- when fg/bg is skiped they default to themes fg/bg - -- color = 'WarningMsg' - -- or highlight group - -- color = "WarningMsg" + -- + -- Note: all other color options like diff_color including themes accept same color values + -- + -- example: + -- color = {fg = '#ffaa88', bg = 'grey', gui='italic,bold'}, + -- color = {fg = 204} -- when fg/bg is skiped they default to themes fg/bg + -- color = 'WarningMsg' -- highlight groups can also be used + -- color = nil, -- default is themes color for that section and mode - -- Type option specifies what type a component is. - -- When type is omitted lualine will guess it. - -- Available types [format: type_name(example)] - -- mod(branch/filename), stl(%f/%m), var(g:coc_status/bo:modifiable), - -- lua_expr(lua expressions), vim_fun(viml function name) + + -- This option specifies what type a component is. + -- When it's omitted lualine will guess it for you. + -- + -- Available types are: + -- [format: type_name(example)], mod(branch/filename), + -- stl(%f/%m), var(g:coc_status/bo:modifiable), + -- lua_expr(lua expressions), vim_fun(viml function name) + -- -- lua_expr is short for lua-expression and vim_fun is short fror vim-function type = nil, - padding = 1, -- adds padding to the left and right of components - -- padding can be specified to left or right separately like - -- padding = { left = left_padding, right = right_padding } - fmt = nil, -- format function, formats component's output + padding = 1, -- Adds padding to the left and right of components. + -- Padding can be specified to left or right independently, e.g.: + -- padding = { left = left_padding, right = right_padding } + fmt = nil, -- Format function, formats the component's output. } } } @@ -423,24 +434,25 @@ Component specific options These are options that are available on lualine_a = { { 'buffers', - show_filename_only = true, -- shows shortened relative path when false - show_modified_status = true, -- shows indicator then buffer is modified - mode = 0, -- 0 shows buffer name - -- 1 buffer index (bufnr) - -- 2 shows buffer name + buffer index (bufnr) - max_length = vim.o.columns * 2 / 3, -- maximum width of buffers component - -- can also be a function that returns value of max_length dynamicaly + show_filename_only = true, -- Shows shortened relative path when set to false + show_modified_status = true, -- Shows indicator then buffer is modified + mode = 0, -- 0: Shows buffer name + -- 1: Shows buffer index (bufnr) + -- 2: Shows buffer name + buffer index (bufnr) + max_length = vim.o.columns * 2 / 3, -- Maximum width of buffers component, + -- it can also be a function that returns + -- the value of `max_length` dynamically. filetype_names = { TelescopePrompt = 'Telescope', dashboard = 'Dashboard', packer = 'Packer', fzf = 'FZF', alpha = 'Alpha' - }, -- shows specific buffer name for that filetype ( { `filetype` = `buffer_name`, ... } ) + }, -- Shows specific buffer name for that filetype ( { `filetype` = `buffer_name`, ... } ) buffers_color = { -- Same values like general color option can be used here. - active = 'lualine_{section}_normal', -- color for active buffer - inactive = 'lualine_{section}_inactive', -- color for inactive buffer + active = 'lualine_{section}_normal', -- Color for active buffer + inactive = 'lualine_{section}_inactive', -- Color for inactive buffer }, } } @@ -455,24 +467,24 @@ Component specific options These are options that are available on lualine_a = { { 'diagnostics', - -- table of diagnostic sources, available sources: - -- 'nvim_lsp', 'nvim_diagnostic', 'coc', 'ale', 'vim_lsp' - -- Or a function that returns a table like + -- Table of diagnostic sources, available sources are: + -- 'nvim_lsp', 'nvim_diagnostic', 'coc', 'ale', 'vim_lsp'. + -- or a function that returns a table like: -- {error=error_cnt, warn=warn_cnt, info=info_cnt, hint=hint_cnt} sources = {'nvim_diagnostic', 'coc'}, -- displays diagnostics from defined severity sections = {'error', 'warn', 'info', 'hint'}, diagnostics_color = { -- Same values like general color option can be used here. - error = 'DiagnosticError', -- changes diagnostic's error color - warn = 'DiagnosticWarn', -- changes diagnostic's warn color - info = 'DiagnosticInfo', -- changes diagnostic's info color - hint = 'DiagnosticHint', -- changes diagnostic's hint color + error = 'DiagnosticError', -- Changes diagnostics' error color + warn = 'DiagnosticWarn', -- Changes diagnostics' warn color + info = 'DiagnosticInfo', -- Changes diagnostics' info color + hint = 'DiagnosticHint', -- Changes diagnostics' hint color }, symbols = {error = 'E', warn = 'W', info = 'I', hint = 'H'}, - colored = true, -- displays diagnostics status in color if set to true + colored = true, -- Displays diagnostics status in color if set to true update_in_insert = false, -- Update diagnostics in insert mode - always_visible = false, -- Show diagnostics even if count is 0, boolean or function returning boolean + always_visible = false, -- Show diagnostics even if there are none } } } @@ -486,19 +498,18 @@ Component specific options These are options that are available on lualine_a = { { 'diff', - colored = true, -- displays diff status in color if set to true - -- all colors are in format #rrggbb + colored = true, -- Displays diff status in color if set to true diff_color = { -- Same values like general color option can be used here. - added = 'DiffAdd', -- changes diff's added color - modified = 'DiffChange', -- changes diff's modified color - removed = 'DiffDelete', -- changes diff's removed color you + added = 'DiffAdd', -- Changes the diff's added color + modified = 'DiffChange', -- Changes the diff's modified color + removed = 'DiffDelete', -- Changes the diff's removed color you }, - symbols = {added = '+', modified = '~', removed = '-'}, -- changes diff symbols + symbols = {added = '+', modified = '~', removed = '-'}, -- Changes the symbols used by the diff source = nil, -- A function that works as a data source for diff. - -- it must return a table like - -- {added = add_count, modified = modified_count, removed = removed_count } - -- Or nil on failure. Count <= 0 won't be displayed. + -- It must return a table like: + -- {added = add_count, modified = modified_count, removed = removed_count } + -- or nil on failure. count <= 0 won't be displayed. } } } @@ -514,8 +525,8 @@ Component specific options These are options that are available on 'fileformat', symbols = { unix = '', -- e712 - dos = '', -- e70f - mac = '', -- e711 + dos = '', -- e70f + mac = '', -- e711 } } } @@ -530,14 +541,18 @@ Component specific options These are options that are available on lualine_a = { { 'filename', - file_status = true, -- displays file status (readonly status, modified status) - path = 0, -- 0 = just filename, 1 = relative path, 2 = absolute path - shorting_target = 40, -- Shortens path to leave 40 space in the window - -- for other components. Terrible name any suggestions? + file_status = true, -- Displays file status (readonly status, modified status) + path = 0, -- 0: Just the filename + -- 1: Relative path + -- 2: Absolute path + + + shorting_target = 40, -- Shortens path to leave 40 spaces in the window + -- for other components. (terrible name, any suggestions?) symbols = { - modified = '[+]', -- when the file was modified - readonly = '[-]', -- if the file is not modifiable or readonly - unnamed = '[No Name]', -- default display name for unnamed buffers + modified = '[+]', -- Text to show when the file is modified + readonly = '[-]', -- Text to show when the file is non-modifiable or readonly + unnamed = '[No Name]', -- Text to show for unnamed buffers } } } @@ -552,8 +567,8 @@ Component specific options These are options that are available on lualine_a = { { 'filetype', - colored = true, -- displays filetype icon in color if set to `true - icon_only = false -- Display only icon for filetype + colored = true, -- Displays filetype icon in color if set to true + icon_only = false -- Display only an icon for filetype } } } @@ -567,11 +582,13 @@ Component specific options These are options that are available on lualine_a = { { 'tabs', - max_length = vim.o.columns / 3, -- maximum width of tabs component - -- can also be a function that returns value of max_length dynamicaly - mode = 0, -- 0 shows tab_nr - -- 1 shows tab_name - -- 2 shows tab_nr + tab_name + max_length = vim.o.columns / 3, -- Maximum width of tabs component, + -- it can also be a function that returns + -- the value of `max_length` dynamically. + mode = 0, -- 0: Shows tab_nr + -- 1: Shows tab_name + -- 2: Shows tab_nr + tab_name + tabs_color = { -- Same values like general color option can be used here. active = 'lualine_{section}_normal', -- color for active tab