Home

Awesome

Deprecated!

As of Jul 11th 2022, onedark.nvim is fully deprecated. No new changes are expected to land. In fact, none have landed for some time.

Check the this another awesome port of atom's onedark theme or migrate to parent repo.

<p align="center"> <img src="https://i.imgur.com/lNdBu1v.png" alt="onedark.nvim" /> <br /> Atom's iconic One Dark theme for Neovim, written in Lua </p> <p align="center"> <a href="https://github.com/monsonjeremy/onedark.nvim"> <img alt="monsonjeremy/onedark.nvim" src="https://img.shields.io/badge/Fork%20of-monsonjeremy%2Fonedark.nvim-blue" /> </a> <a href="https://github.com/ful1e5/onedark.nvim/actions"> <img alt="GitHub Action Linting" src="https://github.com/ful1e5/onedark.nvim/actions/workflows/lint.yml/badge.svg" /> </a> <a href="twitter.com/ful1e5"> <img alt="Twitter" src="https://img.shields.io/badge/twitter-ful1e5-blue" /> </a> </p>

Features

Requirements

Installation

Install the theme with your preferred package manager:

vim-plug

Plug 'ful1e5/onedark.nvim'

packer

use 'ful1e5/onedark.nvim'

Usage

Enable the colorscheme:

" Vim Script
colorscheme onedark
-- Lua
require('onedark').setup()

Configuration

OptionDefaultDescription
colors{}You can override specific color groups to use other groups or a hex color.
comment_styleitalicHighlight style for comments (check :help highlight-args for options)
dark_floatfalseFloat windows like the lsp diagnostics windows get a darker background.
dark_sidebartrueSidebar like windows like NvimTree get a darker background.
devfalseDeveloper Mode.
function_styleNONEHighlight style for functions (check :help highlight-args for options)
hide_end_of_buffertrueEnabling this option, will hide filler lines (~) after the end of the buffer.
hide_inactive_statuslinetrueEnabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard StatusLine.
highlight_linenumberfalseEnabling this option, will enable dark color to LineNr, SignColumn and CursorLineNr highlights.(also support gitsigns plugin)
keyword_styleitalicHighlight style for keywords (check :help highlight-args for options)
lualine_boldfalseWhen true, section headers in the lualine theme will be bold.
msg_area_styleNONEHighlight style for messages and cmdline (check :help highlight-args for options)
overridesfunctionOverride specific highlight groups. The function accpet colors as argument. You can also add a non-exists highlight by enabling the dev mode.
sidebars{}Set a darker background on sidebar-like windows. For example: {"qf", "vista_kind", "terminal", "packer"}
transparentfalseEnable this to disable setting the background color.
transparent_sidebarfalseSidebar like windows like NvimTree get a transparent background.
variable_styleNONEHighlight style for variables and identifiers (check :help highlight-args for options)
" Example config in VimScript
" configuration needs to be set BEFORE loading the color scheme with `colorscheme` command
let g:onedark_function_style = "italic"
let g:onedark_sidebars = ["qf", "vista_kind", "terminal", "packer"]

" Change the "hint" color to the "orange0" color, and make the "error" color bright red
let g:onedark_colors = {
  \ 'hint': 'orange0',
  \ 'error': '#ff0000'
\ }

" Load the colorscheme
colorscheme onedark
-- Example config in Lua
require("onedark").setup({
  function_style = "italic",
  sidebars = {"qf", "vista_kind", "terminal", "packer"},

  -- Change the "hint" color to the "orange0" color, and make the "error" color bright red
  colors = {hint = "orange0", error = "#ff0000"},

  -- Overwrite the highlight groups
  overrides = function(c)
    return {
      htmlTag = {fg = c.red0, bg = "#282c34", sp = c.hint, style = "underline"},
      DiagnosticHint = {link = "LspDiagnosticsDefaultHint"},
      -- this will remove the highlight groups
      TSField = {},
    }
  end
})

Lualine Support

To enable the onedark theme for Lualine, simply specify it in your lualine settings:

require('lualine').setup {
  options = {
    theme = 'onedark-nvim',
    -- ... your lualine config
  }
}

normal insert visual command terminal

Terminal Themes

To generate the configs make terminal or :luafile lua/onedark/terminal/init.lua

Extra color configs for kitty, and Alacritty can be found in terminal directory. To use them, refer to their respective documentation.

Making undercurls work properly in Tmux

To have undercurls show up and in color, add the following to your Tmux config file:

# Undercurl
set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'  # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'  # underscore colours - needs tmux-3.0

Plugin Support

Inspirations

Screenshot

<p align="center"> <img src="https://imgur.com/1ksV9DW.png" alt="onedark" /> </p>

Default

<p align="center"> <img src="https://imgur.com/0R7dvzB.png" alt="Default" /> </p>

Normal

" VimScript
let g:onedark_comment_style = "NONE"
let g:onedark_keyword_style = "NONE"
let g:onedark_function_style = "NONE"
let g:onedark_variable_style = "NONE"
-- Lua
require("onedark").setup({
  comment_style = "NONE",
  keyword_style = "NONE",
  function_style = "NONE",
  variable_style = "NONE"
  -- ... your onedark config
})
<p align="center"> <img src="https://imgur.com/ujZ5tkS.png" alt="Normal" /> </p>

Italic

" VimScript
let g:onedark_comment_style = "italic"
let g:onedark_keyword_style = "italic"
let g:onedark_function_style = "italic"
let g:onedark_variable_style = "italic"
-- Lua
require("onedark").setup({
  comment_style = "italic",
  keyword_style = "italic",
  function_style = "italic",
  variable_style = "italic"
  -- ... your onedark config
})
<p align="center"> <img src="https://imgur.com/YQYPpn1.png" alt="Italic" /> </p>

Minimal

" VimScript
let g:onedark_hide_inactive_statusline = 1
let g:onedark_dark_sidebar = 0
let g:onedark_dark_float = 0
-- Lua
require("onedark").setup({
  hide_inactive_statusline = true,
  dark_sidebar = false,
  dark_float = false
  -- ... your onedark config
})
<p align="center"> <img src="https://imgur.com/UuEbkyZ.png" alt="Minimal" /> </p>

Highlight Line-Number

" VimScript
let g:onedark_highlight_linenumber = 1
-- Lua
require("onedark").setup({
  highlight_linenumber = true
  -- ... your onedark config
})
<p align="center"> <img src="https://imgur.com/ZAiFAAM.png" alt="Highlight Line-Number" /> </p>

Telescope

<p align="center"> <img src="https://imgur.com/xLKjj0I.png" alt="Telescope plugin" /> </p>