Skip to content

Color scheme for neovim, based on SublimeText 4 monokai

License

Notifications You must be signed in to change notification settings

ofirgall/ofirkai.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ofirkai.nvim

Monokai theme for Neovim with treesitter support, aimed to feel like SublimeText 4.

Requires Neovim 0.8+





Dark Blue Theme

Why not monokai.nvim?

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.

Installation

use 'ofirgall/ofirkai.nvim'

Updates

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' }

Usage

-- 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.

Additional highlight groups

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.

Supported Plugins

There is a screenshot example for each plugin.

Status Lines

lualine.nvim - Custom setup required (Click to Expand)

Setup Example:

require('lualine').setup {
	options = {
		theme = require('ofirkai.statuslines.lualine').theme,
	}
}

Tab Lines

bufferline.nvim - Custom setup required (Click to expand)

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,
	},
}

Winbars

lualine.nvim - Custom setup required (Click to Expand)

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,
}

Others

nvim-cmp - Custom setup is Optional (Click to expand)

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'
		})
	},

})

dressing.nvim - Custom setup required (Click to expand)

Setup Example:

-- Requires `WhiteBorder` to show the title.
require('dressing').setup {
    input = {
        winhighlight = require('ofirkai.plugins.dressing').winhighlight
    }
}

nvim-tree.lua - Custom setup is Optional (Click to Expand)
require('nvim-tree').setup {
	renderer = {
		icons = {
			git_placement = 'after',
			modified_placement = 'after',
			glyphs = {
				git = {
					unstaged = '',
					staged = '',
					untracked = '',
					deleted = '',
				},
			},
		},
	},
}


telescope.nvim - Click to expand


noice.nvim - Custom setup is Optional (Click to Expand)

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,
        },
    },
}

nvim-notify - Custom setup is Optional (Click to Expand)

require('notify').setup {
    background_colour = require('ofirkai').scheme.ui_bg,
}

diffview.nvim - Click to expand


gitsigns.nvim - Click to expand


nvim-treesitter-context - Click to expand


lsp_signature.nvim - Click to expand

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 = '',
}

tmux status bar - Click to expand


Full setup example

ui.lua from my dotfiles.

Contributing

Pull requests are welcome, you must provide a screenshot of before/after the change.

About

Color scheme for neovim, based on SublimeText 4 monokai

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages