Giter Club home page Giter Club logo

ofirkai.nvim's Introduction

ofirkai.nvim

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

Requires Neovim 0.8+



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

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.

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 - Click to expand


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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.