docs: simplify extend/override example

This commit is contained in:
Michael Chris Lopez
2021-10-28 19:08:37 +08:00
parent fb181a3a36
commit 497dee22ed

View File

@@ -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()
return {
-- Create some specs TabLine { base.TabLine, gui = "italic" }, -- setting gui to "italic"
local specs = lush.parse(function() }
return { end)
TabLine { base.TabLine, gui = "italic" }, -- setting gui to "italic" -- Apply specs using lush tool-chain
lush.apply(lush.compile(specs))
end)
-- Apply specs using lush tool-chain
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