docs: simplify extend/override example
This commit is contained in:
@@ -110,31 +110,23 @@ Here's an example of how to extend/override some highlights.
|
|||||||
`lua/customize_zenbones.lua`:
|
`lua/customize_zenbones.lua`:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
local function customize_zenbones()
|
local lush = require "lush"
|
||||||
if vim.g.colors_name ~= "zenbones" then
|
local base = require "zenbones"
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local lush = require "lush"
|
-- Create some specs
|
||||||
local base = require "zenbones"
|
local specs = lush.parse(function()
|
||||||
|
|
||||||
-- Create some specs
|
|
||||||
local specs = lush.parse(function()
|
|
||||||
return {
|
return {
|
||||||
TabLine { base.TabLine, gui = "italic" }, -- setting gui to "italic"
|
TabLine { base.TabLine, gui = "italic" }, -- setting gui to "italic"
|
||||||
|
}
|
||||||
end)
|
end)
|
||||||
-- Apply specs using lush tool-chain
|
-- Apply specs using lush tool-chain
|
||||||
lush.apply(lush.compile(specs))
|
lush.apply(lush.compile(specs))
|
||||||
end
|
|
||||||
|
|
||||||
return customize_zenbones
|
|
||||||
```
|
```
|
||||||
|
|
||||||
And then somewhere in your `init.vim`:
|
And then somewhere in your `init.vim`:
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
autocmd VimEnter,ColorScheme * lua require("customize_zenbones")()
|
autocmd ColorScheme zenbones lua require "customize_zenbones"
|
||||||
```
|
```
|
||||||
|
|
||||||
See also
|
See also
|
||||||
|
|||||||
Reference in New Issue
Block a user