Skip to content

Commit 783eba4

Browse files
committed
docs: instructions on how to do transparent background
1 parent f3e6283 commit 783eba4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,27 @@ set_hl(0, "Group", { fg = mono[15] })
105105
set_hl(0, "Group", { fg = everforest.green })
106106
```
107107

108+
### Transparent Background
109+
110+
```lua
111+
local set_hl = vim.api.nvim_set_hl
112+
local mono = require("e-ink.palette").mono()
113+
114+
set_hl(0, "Normal", { fg = mono[12], bg = "NONE" })
115+
```
116+
117+
or depending on the value of `vim.o.background`.
118+
119+
```lua
120+
local set_hl = vim.api.nvim_set_hl
121+
local mono = require("e-ink.palette").mono()
122+
123+
-- transparent only when `:set background=dark`
124+
if vim.o.background == "dark" then
125+
set_hl(0, "Normal", { fg = mono[12], bg = "NONE" })
126+
end
127+
```
128+
108129
 
109130

110131
## Special Thanks

0 commit comments

Comments
 (0)