docs: updated options secion in README.md
This commit is contained in:
parent
202487d2ef
commit
44eb9cbff9
103
README.md
103
README.md
|
@ -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
|
##### Available global options
|
||||||
icons properly.\
|
Option | Default | Behaviour | Supported components
|
||||||
*Suported by branch, fileformat, filetype, location*\
|
:------: | :------: | :----------: | :-----:
|
||||||
Example:
|
icons_enabled | true | Displays icons on components You should have powerline supported fonts to see icons properly. | branch, fileformat, filetype, location
|
||||||
|
padding | 1 | Adds padding to the left and right of components | all
|
||||||
|
left_padding | 1 | Adds padding to the left of components | all
|
||||||
|
right_padding | 1 | Adds padding to the right of components | all
|
||||||
|
upper | false | Changes components to be uppercase | all
|
||||||
|
lower | false | Changes components to be lowercase | all
|
||||||
|
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
|
||||||
|
##### Global options example:
|
||||||
```lua
|
```lua
|
||||||
lualine.options.icons_enabled = true
|
lualine.options.icons_enabled = true
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Genaral options
|
|
||||||
These options are available for all components.\
|
|
||||||
option (default_value)\
|
|
||||||
---------- ----------------------
|
|
||||||
- padding (1)\
|
|
||||||
spaces on left and right
|
|
||||||
- left_padding (1)\
|
|
||||||
spaces on left
|
|
||||||
- right_padding (1)\
|
|
||||||
spaces on right
|
|
||||||
- icon (depends on component)
|
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue