Skip to content

One Dark Theme for Neovim >= 0.5.0 written in lua based on Atom's One Dark UI Theme. Additionally, it comes with 5 color variant styles

License

Notifications You must be signed in to change notification settings

one-dark/onedark.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Neovim One Dark

A Dark Theme for Neovim based on One Dark Theme written in lua with TreeSitter syntax highlight.

Features

  • 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

Plugins Supported

Installation

Install via your favorite package manager.

Vim Plug

Plug 'one-dark/onedark.nvim'

Packer

use 'one-dark/onedark.nvim'

Manual

git clone https://github.com/one-dark/onedark.nvim ~/.config/nvim
nvim +PackerSync

Usage

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
  }
}

Styles

Normal

colorscheme onedark

onedark

Vivid

let g:onedark_style = 'vivid'
colorscheme onedark

onedark-vivid

Configuration

Important: you need to add the configs before changing colorscheme

Onedark options

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

Configure onedark.nvim using vimscript:

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

Configure onedark.nvim using lua:

vim.g.onedark_style = 'vivid'
vim.g.onedark_italics = false
vim.g.<onedark_option> = 'value'
require('onedark').setup()

About

One Dark Theme for Neovim >= 0.5.0 written in lua based on Atom's One Dark UI Theme. Additionally, it comes with 5 color variant styles

Resources

License

Stars

Watchers

Forks

Languages

  • Lua 99.4%
  • Vim Script 0.6%