doc: remove folds from README

people seem to have trouble finding documented stuff
because of them :/
This commit is contained in:
shadmansaleh 2021-11-16 08:56:20 +06:00
parent e6b6caa93b
commit 7b608cb573
2 changed files with 42 additions and 57 deletions

View File

@ -98,7 +98,7 @@ Lualine has sections as shown below.
Each sections holds it's components e.g. current vim's mode. Each sections holds it's components e.g. current vim's mode.
<details><summary>Configuring lualine in init.vim</summary> #### Configuring lualine in init.vim
All the examples below are in lua. You can use the same examples All the examples below are in lua. You can use the same examples
in `.vim` file by wrapping them in lua heredoc like this: in `.vim` file by wrapping them in lua heredoc like this:
@ -111,9 +111,8 @@ END
checkout `:help lua-heredoc`. checkout `:help lua-heredoc`.
</details>
<details><summary>Default config</summary> #### Default config
```lua ```lua
require'lualine'.setup { require'lualine'.setup {
@ -147,7 +146,6 @@ require'lualine'.setup {
} }
``` ```
</details>
If you want to get your current lualine config. you can If you want to get your current lualine config. you can
do so with do so with
@ -177,8 +175,7 @@ All available themes are listed in [THEMES.md](./THEMES.md)
Please create a pr if you managed to port a popular theme before me, [here is how to do it](./CONTRIBUTING.md). Please create a pr if you managed to port a popular theme before me, [here is how to do it](./CONTRIBUTING.md).
<details> #### Customizing themes
<summary>Customizing themes</summary>
```lua ```lua
local custom_gruvbox = require'lualine.themes.gruvbox' local custom_gruvbox = require'lualine.themes.gruvbox'
@ -192,7 +189,6 @@ require'lualine'.setup{
Theme structure is available [here](./CONTRIBUTING.md#adding-a-theme) Theme structure is available [here](./CONTRIBUTING.md#adding-a-theme)
</details>
--- ---
@ -213,13 +209,12 @@ options = {
Here left means it'll be used for left sections (a, b, c) and right means Here left means it'll be used for left sections (a, b, c) and right means
it'll be used for right sections (x, y, z). it'll be used for right sections (x, y, z).
<details><summary>Disabling separators</summary> #### Disabling separators
```lua ```lua
options = {section_separators = '', component_separators = ''} options = {section_separators = '', component_separators = ''}
``` ```
</details>
--- ---
@ -229,8 +224,7 @@ options = {section_separators = '', component_separators = ''}
sections = {lualine_a = {'mode'}} sections = {lualine_a = {'mode'}}
``` ```
<details> #### Available components
<summary><b>Available components</b></summary>
* `branch` (git branch) * `branch` (git branch)
* `buffers` (shows currently available buffers) * `buffers` (shows currently available buffers)
@ -247,7 +241,6 @@ sections = {lualine_a = {'mode'}}
* `progress` (%progress in file) * `progress` (%progress in file)
* `tabs` (shows currently available tabs) * `tabs` (shows currently available tabs)
</details>
#### Custom components #### Custom components
@ -266,7 +259,7 @@ sections = {lualine_a = {hello}}
sections = {lualine_a = {'FugitiveHead'}} sections = {lualine_a = {'FugitiveHead'}}
``` ```
#### Vim's statusline items as lualine component ##### Vim's statusline items as lualine component
```lua ```lua
sections = {lualine_c = {'%=', '%t%m', '%3p'}} sections = {lualine_c = {'%=', '%t%m', '%3p'}}
@ -322,9 +315,6 @@ shown . On the other hand branch will be formatted with global formatter
#### Available options #### Available options
<details>
<summary><b>Global options</b></summary>
#### Global options #### Global options
These are `options` that are used in options table. These are `options` that are used in options table.
@ -350,12 +340,7 @@ options = {
} }
``` ```
</details> #### General component options
<details>
<summary><b>General component options</b></summary>
#### General options
These are options that control behavior at component level These are options that control behavior at component level
and are available for all components. and are available for all components.
@ -404,10 +389,8 @@ sections = {
} }
``` ```
</details>
<details> #### Component specific options
<summary><b>Component specific options</b></summary>
These are options that are available on specific components. These are options that are available on specific components.
For example you have option on `diagnostics` component to For example you have option on `diagnostics` component to
@ -568,7 +551,6 @@ sections = {
} }
``` ```
</details>
--- ---
@ -637,8 +619,7 @@ You can load extensions with:
extensions = {'quickfix'} extensions = {'quickfix'}
``` ```
<details> #### Available extensions
<summary><b>Available extensions</b></summary>
* chadtree * chadtree
* fern * fern
@ -649,10 +630,8 @@ extensions = {'quickfix'}
* quickfix * quickfix
* toggleterm * toggleterm
</details>
<details> #### Custom extensions
<summary><b>Custom extensions</b></summary>
You can define your own extensions. If you think an extension might be useful for others then please submit a pr. You can define your own extensions. If you think an extension might be useful for others then please submit a pr.
@ -661,8 +640,6 @@ local my_extension = {sections = {lualine_a = 'mode'}, filetypes = {'lua'}}
require'lualine'.setup {extensions = {my_extension}} require'lualine'.setup {extensions = {my_extension}}
``` ```
</details>
--- ---
### Disabling lualine ### Disabling lualine

View File

@ -82,10 +82,13 @@ Lualine has sections as shown below.
Each sections holds its components e.g. current vims mode. Each sections holds its components e.g. current vims mode.
Configuring lualine in init.vim *lualine-Configuring-lualine-in-init.vim*
Configuring lualine in init.vim All the examples below are in lua. You
can use the same examples in `.vim` file
by wrapping them in lua heredoc like
this:
All the examples below are in lua. You can use the same examples in `.vim` file
by wrapping them in lua heredoc like this:
> >
lua << END lua << END
@ -96,7 +99,7 @@ by wrapping them in lua heredoc like this:
checkout `:help lua-heredoc`. checkout `:help lua-heredoc`.
Default config *lualine-Default-config*
> >
require'lualine'.setup { require'lualine'.setup {
@ -131,7 +134,9 @@ Default config
< <
If you want to get your current lualine config. you can do so with Default config If you want to get your current lualine
config. you can do so with
> >
require'lualine'.get_config() require'lualine'.get_config()
@ -161,7 +166,7 @@ All available themes are listed in THEMES.md <./THEMES.md>
Please create a pr if you managed to port a popular theme before me, here is Please create a pr if you managed to port a popular theme before me, here is
how to do it <./CONTRIBUTING.md>. how to do it <./CONTRIBUTING.md>.
Customizing themes *lualine-Customizing-themes*
> >
local custom_gruvbox = require'lualine.themes.gruvbox' local custom_gruvbox = require'lualine.themes.gruvbox'
@ -174,7 +179,9 @@ Customizing themes
< <
Theme structure is available here <./CONTRIBUTING.md#adding-a-theme> Customizing themes Theme structure is available here
<./CONTRIBUTING.md#adding-a-theme>
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
@ -198,7 +205,7 @@ Lualine defines two kinds of separators:
Here left means itll be used for left sections (a, b, c) and right means Here left means itll be used for left sections (a, b, c) and right means
itll be used for right sections (x, y, z). itll be used for right sections (x, y, z).
Disabling separators *lualine-Disabling-separators*
> >
options = {section_separators = '', component_separators = ''} options = {section_separators = '', component_separators = ''}
@ -214,7 +221,7 @@ CHANGING COMPONENTS IN LUALINE SECTIONS ~
< <
Available components ~ *lualine-Available-components*
- `branch` (git branch) - `branch` (git branch)
@ -252,7 +259,7 @@ VIM FUNCTIONS AS LUALINE COMPONENT
< <
*lualine-Vims-statusline-items-as-lualine-component* VIMS STATUSLINE ITEMS AS LUALINE COMPONENT
> >
sections = {lualine_c = {'%=', '%t%m', '%3p'}} sections = {lualine_c = {'%=', '%t%m', '%3p'}}
@ -312,8 +319,6 @@ shown. On the other hand branch will be formatted with global formatter
*lualine-Available-options* *lualine-Available-options*
Global options ~
*lualine-Global-options* *lualine-Global-options*
Global options These are `options` that are used in Global options These are `options` that are used in
@ -342,11 +347,9 @@ in component.
< <
General component options ~ *lualine-General-component-options*
*lualine-General-options* General component options These are options that control behavior
General options These are options that control behavior
at component level and are available for at component level and are available for
all components. all components.
@ -396,12 +399,15 @@ General options These are options that control behavior
< <
Component specific options ~ *lualine-Component-specific-options*
These are options that are available on specific components. For example you Component specific options These are options that are available on
have option on `diagnostics` component to specify what your diagnostic sources specific components. For example you
have option on `diagnostics` component
to specify what your diagnostic sources
will be. will be.
*lualine-buffers-component-options* *lualine-buffers-component-options*
> >
@ -639,7 +645,7 @@ extensions with:
< <
Available extensions ~ *lualine-Available-extensions*
- chadtree - chadtree
@ -652,11 +658,13 @@ Available extensions ~
- toggleterm - toggleterm
Custom extensions ~ *lualine-Custom-extensions*
You can define your own extensions. If you think an extension might be useful Custom extensions You can define your own extensions. If
you think an extension might be useful
for others then please submit a pr. for others then please submit a pr.
> >
local my_extension = {sections = {lualine_a = 'mode'}, filetypes = {'lua'}} local my_extension = {sections = {lualine_a = 'mode'}, filetypes = {'lua'}}
require'lualine'.setup {extensions = {my_extension}} require'lualine'.setup {extensions = {my_extension}}