Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Latest commit

 

History

History
263 lines (203 loc) · 8.99 KB

README.md

File metadata and controls

263 lines (203 loc) · 8.99 KB

onedark.nvim
Atom's iconic One Dark theme for Neovim, written in Lua

monsonjeremy/onedark.nvim GitHub Action Linting

✨ Features

  • supports the latest Neovim 0.5 features like TreeSitter and LSP
  • minimal inactive statusline (currently bugged)
  • vim terminal colors
  • darker background for sidebar-like windows
  • color configs for Kitty and Alacritty
  • lualine theme

🔌 Plugin Support

⚡️ Requirements

  • Neovim >= 0.5.0

📦 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
lua require('onedark').setup()
-- Lua
require('onedark').setup()

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

📝 NOTE: Set lualine configuration before onedark.

require('lualine').setup {
  options = {
    theme = 'onedark',
    -- For round icons (require Nerd-Font)
    -- section_separators = {"", ""},
    -- component_separators = {"", ""},
    -- ... your lualine config
  }
}

To enable the onedark colorscheme for Lightline:

" Vim Script
let g:lightline = {'colorscheme': 'onedark'}
-- Lua
vim.g.lightline = {colorscheme = "onedark"}

⚙️ Configuration

Option Default Description
commentStyle italic Highlight style for comments (check :help highlight-args for options)
keywordStyle italic Highlight style for keywords (check :help highlight-args for options)
functionStyle NONE Highlight style for functions (check :help highlight-args for options)
variableStyle NONE Highlight style for variables and identifiers (check :help highlight-args for options)
msgAreaStyle NONE Highlight style for messages and cmdline (check :help highlight-args for options)
transparent false Enable this to disable setting the background color
hideInactiveStatusline false Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard StatusLine and LuaLine.
sidebars {} Set a darker background on sidebar-like windows. For example: {"qf", "vista_kind", "terminal", "packer"}
darkSidebar true Sidebar like windows like NvimTree get a darker background
darkFloat true Float windows like the lsp diagnostics windows get a darker background.
colors {} You can override specific color groups to use other groups or a hex color
-- Example config in Lua
require("onedark").setup({
  functionStyle = "italic",
  sidebars = {"qf", "vista_kind", "terminal", "packer"},

  -- Change the "hint" color to the "orange" color, and make the "error" color bright red
  colors = {hint = "orange", error = "#ff0000"}
})
" Example config in VimScript
lua << EOF
require("onedark").setup({
  functionStyle = "italic",
  sidebars = {"qf", "vista_kind", "terminal", "packer"},

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

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

🌈 Extras

To generate the configs make extra

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

Credit

📺 Screenshot

onedark.nvim

Default

Default fonts

Normal

require("onedark").setup({
  commentStyle = "NONE",
  keywordStyle = "NONE",
  functionStyle = "NONE",
  variableStyle = "NONE"
  -- ... your onedark config
})

Normal fonts

Italic

require("onedark").setup({
  commentStyle = "italic",
  keywordStyle = "italic",
  functionStyle = "italic",
  variableStyle = "italic"
  -- ... your onedark config
})

Italic fonts

Minimal

require("onedark").setup({
  hideInactiveStatusline = true,
  darkSidebar = false,
  darkFloat = false
  -- ... your onedark config
})

Minimal

Telescope

Telescope plugin

Useful Links

Support

Buy Me A Coffee

Self Promotion

Follow me on Twitter

(◣_◢)

Stop scrolling, It's hurts me