jackm245 / onedark.nvim

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

    OneDark.nvim

Dark and Light Themes for neovim >= 0.5 based on Atom One Dark & Atom One Light theme written in lua with TreeSitter syntax highlight.

For Vim / Neovim < 0.5, prefer joshdick/onedark.vim

Features

  • 8 theme styles (One Dark + 5 variants) and (One Light + 1 variant)
  • Supporting multiple plugins with hand picked proper colors
  • Customize Colors, Highlights and Code style of the theme as you like (Refer Customization)
  • Toggle the theme style without exiting Neovim using shortcut <leader>ts (Refer Default Config)

Themes

Onedark - dark Onedark - darker

Onedark - cool Onedark - deep

Onedark - warm Onedark - warmer

Installation

Install via your favourite package manager

" Using Vim-Plug
Plug 'navarasu/onedark.nvim'
-- Using Packer
use 'navarasu/onedark.nvim'

Configuration

Enable theme

-- Lua
require('onedark').load()
" Vim
colorscheme onedark 

Change default style

-- Lua
require('onedark').setup {
    style = 'darker'
}
require('onedark').load()
" Vim
let g:onedark_style = 'darker'
colorscheme onedark

Options: dark, darker, cool, deep, warm, warmer

Default Configuration

-- Lua
require('onedark').setup  { 
    -- Main options --
     style = 'dark', -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light'
     transparent = false,  -- Show/hide background 
     term_colors = true, -- Change terminal color as per the selected theme style
     ending_tildes = false, -- show the end-of-buffer tildes. By default they are hidden
     -- toggle theme style ---
     toggle_style_key = '<leader>ts', -- Default keybinding to toggle
     toggle_style_list = ['dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light'], --list of styles to toggle amoung
     
     -- Change code style ---
     -- Options are italic, bold, underline, none
     -- You can configure multiple style with comma seperated, For e.g., keywords = 'italic,bold'
     code_style = {
       comments = 'italic',
       keywords = 'none', 
       functions = 'none', 
       strings = 'none',
       variables = 'none'
     },
     
    -- Custom Highlights --
     colors = {}, -- Override default colors
     highlights = {}, -- Override highlight groups
     
     -- Plugins Config --
     diagnostics = {
        darker = true, -- darker colors for diagnostic
        undercurl = true,   -- use undercurl for diagnostics
        background = true,    -- use background color for virtual text
     },
     
 }

Customization

Example custom colors and Highlights config

require('onedark').setup {
  colors = {
    bright_orange = "#ff8800",    -- define a new color
    green = '#00ffaa',            -- redefine an existing color
  },
  highlights = {
    TSKeyword = {fg = '$green'},
    TSString = {fg = '$bright_orange', bg = '#00ff00', fmt = 'bold'},
    TSFunction = {fg = '#0000ff', sp = '$cyan', fmt = 'underline,italic'},
  }
}

Plugins Configuration

Enable lualine

To Enable the onedark theme for Lualine, specify theme as onedark:

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

Plugins Supported

Reference

Contributing

Pull requests are welcome 🎉👍.

License

MIT

About

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

License:MIT License


Languages

Language:Lua 100.0%