A light and dark colorscheme for neovim.
This theme is based on the One half color scheme. I have made some slight modifications to suit my personal preferences. I mainly program in Ruby, so the styling will be adjusted to make Ruby syntax look good.
Make sure you have neovim 0.8 with treesitter installed.
Install the colorscheme with your favorite plugin manager.
-- Lazy
return {
"CodeGradox/onehalf-lush",
lazy = false,
priority = 1000,
config = function()
vim.api.nvim_set_option("background", "light")
vim.cmd("colorscheme onehalf-lush")
end
}
-- Packer
return require("packer").startup(function()
use "CodeGradox/onehalf-lush"
end)
vim.api.nvim_set_option("background", "light")
vim.cmd("colorscheme onehalf-lush")
Select between light and dark theme.
-- Set the color scheme.
vim.api.nvim_set_option("background", "light")
vim.cmd("colorscheme onehalf-lush")
-- Set the dark colorscheme
vim.api.nvim_set_option("background", "dark")
vim.cmd("colorscheme onehalf-lush-dark")
You can enable better syntax highlight with the following line.
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
}
There is also a theme for lualine. Note that the colors are determined by the value of vim.opt.background
. I may fix this in the future, if I can figure out how.
require("lualine").setup {
options = {
theme = "onehalf-lush"
}
}
This package was originally written to be compatible with Lush. When the Lush template stopped working, the plugin was rewritten to work without Lush. I have copied mofiguls vscode plugin to get the hightlight groups, so credits to them for making it possible to easily extend their colorscheme.