Skip to content

deparr/tairiki.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tairiki.nvim

Dark Theme for neovim >= 0.8 based on Tomorrow Night and forked from Onedark.nvim. Theme written in lua with TreeSitter syntax highlighting.

For latest TreeSitter syntax highlight, upgraded to Neovim 0.8.0 or later built with tree-sitter 0.20.3+

Disclaimer: I wrote this colorscheme for myself and don't really expect others to use it. There's probably broken / bad highlights everywhere, especially in langs I don't use. Create an issue if something is off, or set a custom highlight/color (see Customization)

Features

  • TODO: re-write these
  • 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 toggle_style_key (Refer Config) TODO: maybe add more styles

Showcase

Toggle preview

dark_theme

NOTE: The above image uses the rust treesitter parser for highlights

Installation

Install via your favourite package manager

" Using Vim-Plug
Plug 'deparr/tairiki.nvim'
-- Using Packer
use 'deparr/tairiki.nvim'
-- Using lazy.nvim
{
  'deparr/tairiki.nvim',
  lazy = false,
  priority = 1000, -- only necessary if you use tairiki as default theme
  config = function()
    require('tairiki').setup {
      -- optional configuration here
    }
    require('tairiki').load() -- only necessary to use as default theme, has same behavior as ':colorscheme tairiki'
  end,
}

Configuration

Enable theme

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

Change style

-- Lua
require('tairiki').setup {
    style = 'dark'
}
require('tairiki').load()
" Vim
let g:tairiki_config = {
    \ 'style': 'dark',
\}
colorscheme tairiki

Full Configuration

-- Lua
require('tairiki').setup  {
    -- Main options --
    style = 'dark', -- Default theme style. Choose between 'dark' (more styles on the way)
    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
    cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu
    visual_bold = false, -- bolden visual selections

    -- toggle theme style ---
    toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts"
    toggle_style_list = {'dark'}, -- List of styles to toggle between TODO

    -- Change code style ---
    -- Options are italic, bold, underline, none
    -- You can configure multiple style with comma separated, For e.g., keywords = 'italic,bold'
    code_style = {
        comments = 'italic',
        keywords = 'none',
        functions = 'none',
        strings = 'none',
        variables = 'none'
    },

    -- Lualine options --
    lualine = {
        transparent = false, -- lualine center bar transparency
    },

    -- Custom Highlights --
    colors = {}, -- Override default colors
    highlights = {}, -- Override highlight groups

    -- Plugins Config --
    diagnostics = {
        darker = true, -- darker colors for diagnostic
        undercurl = true,   -- use undercurl instead of underline for diagnostics
        background = true,    -- use background color for virtual text
    },
}

Vimscript configuration

Tairiki can be configured also with Vimscript, using the global dictionary g:tairiki_config. NOTE: when setting boolean values use v:true and v:false instead of 0 and 1

Example:

let g:tairiki_config = {
  \ 'style': 'deep',
  \ 'toggle_style_key': '<leader>ts',
  \ 'ending_tildes': v:true,
  \ 'diagnostics': {
    \ 'darker': v:false,
    \ 'background': v:false,
  \ },
\ }
colorscheme tairiki

Customization

Example custom colors and Highlights config

require('tairiki').setup {
  colors = {
    bright_orange = "#ff8800",    -- define a new color
    green = '#00ffaa',            -- redefine an existing color
  },
  highlights = {
    ["@keyword"] = {fg = '$green'},
    ["@string"] = {fg = '$bright_orange', bg = '#00ff00', fmt = 'bold'},
    ["@function"] = {fg = '#0000ff', sp = '$cyan', fmt = 'underline,italic'},
    ["@function.builtin"] = {fg = '#0059ff'}
  }
}

Note that TreeSitter keywords were changed in neovim version 0.8.0. This theme uses the new highlight keywords. All TreeSitter highlights this theme sets can be viewed here

Plugins Configuration

Enable lualine

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

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

Plugins Supported

Reference

Contributing

Pull requests are welcome 🎉👍.

Tairiki?

Tairiki means 'evening' or 'dusk' in the Kiribati language.

License

MIT

About

Tomorrow Night-esque colorscheme for Neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages