Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Add A Background Image To Neovim With A .lua Config File

I like background images in my terminal. When I switched to using a [TODO: Code shorthand span ] file I wasn't sure how to set it up to show the image. The solution was to add these two lines to [TODO: Code shorthand span ] .

lua
vim.cmd.highlight({ "Normal", "guibg=NONE" })
vim.cmd.highlight({ "Normal", "ctermbg=NONE" })

Those settings change the Neovim background to transparent
to show your image

- This doesn't add an image directly to Neovim. It simply makes Neovim's background transparent to show whatever your terminal background is. You'll need to have one setup there in order to see it

- The config lines need to be below any [TODO: Code shorthand span ] settings. (I just threw them at the very bottom of the file)

- If you have a color scheme/theme running it will continue to work as expected with the exception of the background color. I colorize images to fit the themes so things continue to match

- I'm not sure when [TODO: Code shorthand span ] comes into play. It may not be necessary, but it doesn't seem to be hurting anything

Footnotes And References