A Dark Theme for Neovim based on One Dark Theme written in lua with TreeSitter syntax highlight.
- 6 styles (default one dark + 5 color variants)
- Changing the style without exiting Neovim (using shortcut key
<leader>cs
. If you want to change or disable this mapping see toggle style) - Supported mulitple plugins with hand picked proper colors
- TreeSitter
- LSPDiagnostics
- NvimTree
- Telescope
- WhichKey
- Dashboard
- Lualine
- GitGutter
- GitSigns
- VimFugitive
- DiffView
- Hop
Install via your favorite package manager.
Plug 'one-dark/onedark.nvim'
use 'one-dark/onedark.nvim'
git clone https://github.com/one-dark/onedark.nvim ~/.config/nvim
nvim +PackerSync
Enable the colorscheme:
" ~/.config/nvim/init.vim
colorscheme onedark
-- ~/.config/nvim/init.lua
require('onedark').setup()
To Enable the onedark
theme for Lualine
, specify theme as onedark
:
require('lualine').setup {
options = {
theme = 'onedark'
-- ... your lualine config
}
}
colorscheme onedark
let g:onedark_style = 'vivid'
colorscheme onedark
Important: you need to add the configs before changing colorscheme
Variable name | Default value | Description |
---|---|---|
onedark_style |
'normal' |
Change style variant of one dark |
onedark_italics |
true |
Enable italics |
onedark_transparent_background |
false |
Enable transparent background |
onedark_disable_terminal_colors |
false |
Disable terminal colors |
onedark_diagnostics_undercurl |
true |
Use curly underline for diagnostics |
onedark_darker_diagnostics |
true |
Show diagnostics using a darker color |
onedark_hide_ending_tildes |
false |
Hide end of buffer tildes |
let g:onedark_style = 'vivid'
let g:<onedark_option> = 'value'
colorscheme onedark
When using vimscript to configure onedark settings be sure to use v:true
and v:false
to set boolean values!
let g:onedark_italics = v:true " don't use 0 or 1
vim.g.onedark_style = 'vivid'
vim.g.onedark_italics = false
vim.g.<onedark_option> = 'value'
require('onedark').setup()