Monokai theme for Neovim with treesitter support, aimed to feel like SublimeText 4.
Requires Neovim 0.8+
Before I used Neovim I used Sublime Text for 6 years with the builtin Monokai scheme.
My eyes got used to the monokai colorscheme and I didn't want to change what I used to, so the first thing I did when I transferred to Neovim was searching for a Monokai colorscheme.
I found monokai.nvim and installed it immediately, unfortunately it wasn't 1:1 to Sublime Text, I tinkered some values through the config and achieved a colorscheme I was happy with.
I kept adding support for other plugins and changing the default values of monokai.nvim. A colleague of mine asked which colorscheme I use and how can he install it, I answered it was my customized monokai colorscheme, hence the name ofirkai.
use 'ofirgall/ofirkai.nvim'
ofirkai is my daily driver, I update it for my needs. New plugins I use will be added, and some changes might be added, I recommend watching the repo to keep notified (click on Watch).
In addition, you can follow the experimental branch exp to get experimental updates (if they don't break anything and I liked the change the changes will be merged to master within a week or so).
use { 'ofirgall/ofirkai.nvim', branch = 'exp' }
-- Leave empty for default values
require('ofirkai').setup {
}
-- Or setup with custom parameters
require('ofirkai').setup {
theme = nil -- Choose theme to use, available themes: 'dark_blue'
scheme = require('ofirkai').scheme -- Option to override scheme
custom_hlgroups = {}, -- Option to add/override highlight groups
remove_italics = false, -- Option to change all the italics style to none
}
Or
:colorscheme ofirkai
:colorscheme ofirkai-darkblue
You can find the default values for the scheme and highlights in design.lua.
Note: Each plugin that need a setup has an example in the collapsible section, if you use a theme you must ofirkai first.
ofirkai adds additional highlight groups to help configure other plugins.
InlayHints - For InlayHints.WhiteBorder - For floating windows that utilize the border for text, dressing.nvim.There is a screenshot example for each plugin.
Setup Example:
require('lualine').setup {
options = {
theme = require('ofirkai.statuslines.lualine').theme,
}
}
Setup Example:
-- bufferline.nvim, must be loaded after color scheme (working on that https://github.com/ofirgall/ofirkai.nvim/issues/2)
require('bufferline').setup {
highlights = require('ofirkai.tablines.bufferline').highlights, -- Must
options = { -- Optional, recommended
themable = true, -- Must
separator_style = 'slant',
offsets = { { filetype = 'NvimTree', text = 'File Explorer', text_align = 'center' } },
show_buffer_icons = true,
numbers = 'ordinal',
max_name_length = 40,
},
}
Setup Example:
-- Unfortunately you can't set them for winbar separately in lualine so I use `color` in my winbar sections
-- SmiteshP/nvim-navic (displays function context)
local navic = require('nvim-navic')
navic.setup {
separator = " "
}
local ofirkai_lualine = require('ofirkai.statuslines.lualine')
local winbar = {
lualine_a = {},
lualine_b = {
{
'filename',
icon = '',
color = ofirkai_lualine.winbar_color,
padding = { left = 4 }
},
},
lualine_c = {
{
navic.get_location,
icon = "",
cond = navic.is_available,
color = ofirkai_lualine.winbar_color,
},
},
lualine_x = {},
lualine_y = {},
lualine_z = {}
}
require('lualine').setup {
options = {
icons_enabled = true,
disabled_filetypes = { -- Recommended filetypes to disable winbar
winbar = { 'gitcommit', 'NvimTree', 'toggleterm', 'fugitive' },
},
},
winbar = winbar,
inactive_winbar = winbar,
}
require('cmp').setup({
window = require('ofirkai.plugins.nvim-cmp').window, -- I just removed the `FloatBorder:Normal` from the highlights to allow the FloatBorder to be colored, its not a must.
-- Get lsp icons from ofirkai, requires https://github.com/onsails/lspkind.nvim
formatting = {
format = lspkind.cmp_format({
symbol_map = require('ofirkai.plugins.nvim-cmp').kind_icons,
maxwidth = 50,
mode = 'symbol'
})
},
})
fff.nvim reads most of its colors from generic groups (NormalFloat, FloatBorder, LineNr, ...), so the
picker needs to be pointed at ofirkai's groups to get the picker background and prompt of the theme.
require('fff').setup {
hl = require('ofirkai.plugins.fff').hl,
}
hl is a plain table, override single keys by extending it:
require('fff').setup {
hl = vim.tbl_extend('force', require('ofirkai.plugins.fff').hl, {
cursor = 'Visual',
}),
}
The git status, multi select and file info groups (FFF*) are set by ofirkai directly and need no setup.
Setup Example:
-- Requires `WhiteBorder` to show the title.
require('dressing').setup {
input = {
winhighlight = require('ofirkai.plugins.dressing').winhighlight
}
}
require('nvim-tree').setup {
renderer = {
icons = {
git_placement = 'after',
modified_placement = 'after',
glyphs = {
git = {
unstaged = '',
staged = '',
untracked = '',
deleted = '',
},
},
},
},
}
Setup Example:
require('fff').setup({
hl = {
normal = 'FffNormal',
border = 'FffBorder',
title = 'FffTitle',
prompt = 'FffPrompt',
cursorline = 'FffCursorLine',
matched = 'FffMatched',
selected = 'FffSelected',
selected_active = 'FffSelectedActive',
frecency = 'FffFrecency',
directory_path = 'FffDirectory',
winhl = {
preview = 'Normal:FffPreviewNormal,FloatBorder:FffPreviewBorder,FloatTitle:FffPreviewTitle',
},
},
})
require('noice').setup {
popupmenu = {
enabled = false, -- I prefer nvim-cmp
},
lsp = {
signature = {
enabled = false -- I prefer to use ray-x/lsp_signature.nvim with minimal design
},
override = {
-- Override `vim.lsp.buf.hover` and `nvim-cmp` doc formatter with `noice` doc formatter.
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
['vim.lsp.util.stylize_markdown'] = true,
['cmp.entry.get_documentation'] = true,
},
},
}
require('notify').setup {
background_colour = require('ofirkai').scheme.ui_bg,
}
I don't change the highlight group because I use a minimalistic design for the lsp signature you can adapt it.
local lsp_signature_cfg = {
bind = true,
use_lspsaga = false,
doc_lines = 0,
floating_window = false,
hint_scheme = 'LspSignatureHintVirtualText',
hint_prefix = ' ',
}
Ports of the scheme to terminal emulators, so the shell around Neovim matches it. They live in extras/.
Copy the theme you use into Ghostty's theme directory and select it:
mkdir -p ~/.config/ghostty/themes
cp extras/ghostty/ofirkai ~/.config/ghostty/themes/ # default scheme
cp extras/ghostty/ofirkai-darkblue ~/.config/ghostty/themes/ # dark_blue theme
# ~/.config/ghostty/config
theme = ofirkai
The file name is the theme name, so keep the files extensionless. Reload with
Cmd/Ctrl+Shift+,.
Each file lists the handful of slots that are not a straight copy of the scheme (the ANSI bright row, and the accents that have no ANSI slot of their own).
herdr has no theme files — colours are set inline under [theme.custom] in its
own config, so there is nothing to copy into a directory. Paste
extras/herdr/ofirkai-darkblue into
~/.config/herdr/config.toml under [theme.custom] to match the dark_blue
theme.
ui.lua from my dotfiles.
Pull requests are welcome, you must provide a screenshot of before/after the change.