A Dark Theme for neovim >= 0.5 based on Atom One Dark Theme written in lua with TreeSitter syntax highlight. Additionally, it comes with 5 more color variant styles
For Vim / Neovim < 0.5, prefer joshdick/onedark.vim
- 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
colorscheme onedark
Default
- Default one dark theme based on Atom One Dark Theme
let g:onedark_style = 'darker'
colorscheme onedark
let g:onedark_style = 'cool'
colorscheme onedark
let g:onedark_style = 'deep'
colorscheme onedark
let g:onedark_style = 'warm'
colorscheme onedark
let g:onedark_style = 'warmer'
colorscheme onedark
Install via your favourite package manager
" Using Vim-Plug
Plug 'navarasu/onedark.nvim'
-- Using Packer
use 'navarasu/onedark.nvim'
Install manually
git clone https://github.com/navarasu/onedark.nvim ~/.config/nvim
nvim +PackerSync
Enable the colorscheme:
" Vim-Script:
colorscheme onedark
-- Lua:
require('onedark').setup()
To Enable the onedark
theme for Lualine
, specify theme as onedark
:
require('lualine').setup {
options = {
theme = 'onedark'
-- ... your lualine config
}
}
By pressing <leader>cs
, we can switch the style without exiting Neovim.
If you want to change this mapping:
vim.g.onedark_toggle_style_keymap = '<space>tc'
If you want to disable this mapping completely:
vim.g.onedark_toggle_style_keymap = '<nop>'
Important: you need to add the configs before changing colorscheme
Variable name | Default value | Description |
---|---|---|
onedark_style |
'dark' |
change style variant of one dark |
onedark_transparent_background |
false |
enable transparent background |
onedark_italic_comment |
true |
enable italic comments |
onedark_toggle_style_keymap |
'<leader>cs' |
set toggle style keymap (see toggle style) |
onedark_disable_terminal_colors |
false |
disable terminal colors |
onedark_diagnostics_undercurl |
true |
use curly underline (undercurl) instead of standard 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 = 'darker'
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 booleand values!
let g:onedark_italic_comment = v:true " don't use 0 or 1
vim.g.onedark_style = 'deep'
vim.g.onedark_italic_comment = false
vim.g.<onedark_option> = 'value'
require('onedark').setup()
Pull requests are welcome 🎉👍.