feat: Expose current config with lualine.get_config()
This commit is contained in:
parent
7b98680316
commit
6aecf4a341
|
@ -105,6 +105,13 @@ require'lualine'.setup {
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
If you want to get your current lualine config. you can
|
||||||
|
do so with
|
||||||
|
```lua
|
||||||
|
require'lualine'.get_config()
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
### Starting lualine
|
### Starting lualine
|
||||||
```lua
|
```lua
|
||||||
|
|
|
@ -66,6 +66,11 @@ Default config~
|
||||||
extensions = {}
|
extensions = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
If you want to get your current lualine config. you can
|
||||||
|
do so with >
|
||||||
|
require'lualine'.get_config()
|
||||||
|
|
||||||
|
<
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
STARTING LUALINE *lualine-starting_lualine* *lualine.setup()*
|
STARTING LUALINE *lualine-starting_lualine* *lualine.setup()*
|
||||||
>
|
>
|
||||||
|
|
|
@ -69,4 +69,11 @@ local function apply_configuration(config_table)
|
||||||
return vim.deepcopy(config)
|
return vim.deepcopy(config)
|
||||||
end
|
end
|
||||||
|
|
||||||
return {config = vim.deepcopy(config), apply_configuration = apply_configuration}
|
local function get_current_conifg()
|
||||||
|
return vim.deepcopy(config)
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
get_config = get_current_conifg,
|
||||||
|
apply_configuration = apply_configuration
|
||||||
|
}
|
||||||
|
|
|
@ -237,4 +237,9 @@ local function setup(user_config)
|
||||||
set_tabline()
|
set_tabline()
|
||||||
end
|
end
|
||||||
|
|
||||||
return {setup = setup, statusline = status_dispatch, tabline = tabline}
|
return {
|
||||||
|
setup = setup,
|
||||||
|
statusline = status_dispatch,
|
||||||
|
tabline = tabline,
|
||||||
|
get_config = config_module.get_config,
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue