docs: updated options secion in README.md

This commit is contained in:
Hubert Pelczarski 2021-02-20 05:02:17 +01:00 committed by GitHub
parent 202487d2ef
commit 44eb9cbff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 43 additions and 64 deletions

107
README.md
View File

@ -189,74 +189,53 @@ lualine.sections.lualine_b = { 'g:coc_status', 'bo:filetype' }
### Available options: ### Available options:
#### Global Default options #### Global options
Default options act as default for all components Global options chnge behaviour of all suported components.
- icons_enabled (Default: true) All of these options can also be specifically set to all supported components, full example below.
Displays icons on components
You should have powerline supported fonts to see
icons properly.\
*Suported by branch, fileformat, filetype, location*\
Example:
```lua
lualine.options.icons_enabled = true
``` ##### Available global options
Option | Default | Behaviour | Supported components
#### Genaral options :------: | :------: | :----------: | :-----:
These options are available for all components.\ icons_enabled | true | Displays icons on components You should have powerline supported fonts to see icons properly. | branch, fileformat, filetype, location
option     (default_value)\ padding | 1 | Adds padding to the left and right of components | all
----------       ---------------------- left_padding | 1 | Adds padding to the left of components | all
- padding (1)\ right_padding | 1 | Adds padding to the right of components | all
spaces on left and right upper | false | Changes components to be uppercase | all
- left_padding (1)\ lower | false | Changes components to be lowercase | all
spaces on left format | nil | Takes a function . The funtion gets the result of component as argument and it's return value is displayed. So this function can parse and format the output as user wants. | all
- right_padding (1)\ ##### Global options example:
spaces on right ```lua
- icon (depends on component) lualine.options.icons_enabled = true
displays an icon infront of component ```
- icons_enabled (true)
whether to show icon(if available)
- separator ('|')
which separator to use at end of component
- upper (false)\
Displayed in upper case
- lower (false)\
Displayed in lower case
- format (nil)\
Takes a function . The funtion gets the result of component
as argument and it's return value is displayed. So this function
can parse and format the output as user wants.
- color (Theme colors)\
color option can be used to set custom color to a component\
**Color format:**\
`lua color = {fg = '#rrggbb', bg= '#rrggbb', gui='style'}`\
the members of color table are optional and default to theme
#### Component specific options #### Component specific options
These options are available for specific components only.\ As mentioned above, all global options can be applied to specific components.
List of options are given below. However there are some options which are component-only (you cannot set them as globals)
- filename Option | Default | Behaviour
- file_status (true)\ :------: | :------: | :----:
Whether to display filemodified status in filename icon | Differs for each component | Displays an icon in front of the component
- shorten (true)\ color | nil | Sets custom color for the component in this format<br></br>`color = {fg = '#rrggbb', bg= '#rrggbb', gui='style'}`<br></br>The fields of color table are optional and default to theme
Whether to display full/relative path with filename
- full_path (false)\ In addition, some components have unique options.
Whether to display full path when shorten is false
- fileformat * `filename` component options
- icons_enabled (true)\
Whether to displays icon before component Option | Default | Behaviour
- signify :------: | :------: | :----:
- colored (true)\ file_status | true | Displays file status (readonly status, modified status)
Whether to show colors. Colors are automaticaly full_path | false | Displays relative path if set to `true`, absolute path if set to `false`
extracted from colorscheme . If you want to change shorten | true | if `full_path` is true and `shorten` is `false` it shortens absolute path `aaa/bbb/ccc/file` to `a/b/c/file`
any of those you can use options given below.
- color_added ('#90ee90')\ * `signify` component options
Foreground color of added section
- color_modified ('#f0e130')\ Option | Default | Behaviour
Foreground color of modified section :------: | :------: | :----:
- color_removed ('#ff0038')\ colored | true | displays signify status in color if set to `true`
Foreground color of removed section color_added | `diffAdd` foreground color | changes signify's added section foreground color
color_modified | `diffChange` foreground color | changes signify's changed section foreground color
color_removed | `diffDelete` foreground color | changes signify's removed section foreground color
**Example:** **Example:**
```lua ```lua