Skip to content

cryptomilk/nightcity.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

60 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ™ Night City

This is theme is inspired by Inkpot, Jellybeans, Gruvbbox and Tokyonight.

Kabuki

image

Afterlife

image

Requirements

  • Neovim >= 0.9.0

Features

  • Support for TreeSitter and LSP
  • Vim terminal colors
  • Support for plugins

Plugin Support

You can configure which plugin support you want to enable or disable. See Disabling Plugins below.

Installation

Here are code snippets for some common installation methods (use only one):

With folke/lazy.nvim
Github repo Branch Code snippet
'nightcity.nvim' colorscheme Main { 'cryptomilk/nightcity.nvim', version = false },
Stable { 'cryptomilk/nightcity.nvim', version = '*' },
With wbthomason/packer.nvim
Github repo Branch Code snippet
'nightcity.nvim' colorscheme Main use 'cryptomilk/nightcity.nvim'
With junegunn/vim-plug
Github repo Branch Code snippet
'nightcity.nvim' colorscheme Main Plug 'cryptomilk/nightcity.nvim'

Usage

Enable the colorscheme:

vim.cmd.colorscheme('nightcity')

Configuration

โ—๏ธThe configuration needs to be set BEFORE loading the color scheme with colorscheme nightcity

    -- kabuki or afterlife
    style = 'kabuki', -- The theme comes in two styles: kabuki or afterlife
    terminal_colors = true, -- Use colors used when opening a `:terminal`
    invert_colors = {
        -- Invert colors for the following syntax groups
        cursor = true,
        diff = true,
        error = true,
        search = true,
        selection = false,
        signs = false,
        statusline = true,
        tabline = false,
    },
    font_style = {
        -- Style to be applied to different syntax groups
        comments = { italic = true },
        keywords = { italic = true },
        functions = { bold = true },
        variables = {},
        search = { bold = true },
    },
    -- Plugin integrations. Use `default = false` to disable all integrations.
    plugins = { default = true },
    --- You can override specific highlights to use other groups or a hex color
    --- function will be called with a Highlights and ColorScheme table
    ---@param groups Highlight groups
    ---@param colors ColorScheme
    on_highlights = function(groups, colors) end,

Disabling plugin support

config.plugins defines for which supported plugins highlight groups will be created. Limiting number of integrations slightly decreases startup time. It is a table with boolean (true/false) values which are applied as follows:

  • If plugin name (as listed in above) has an entry, it is used.
  • Otherwise config.plugins.default is used.
require('nightcity').setup({
    plugins = {
        default = true,
        ['hrsh7th/nvim-cmp'] = false
    }
})

Overriding Colors & Highlight Groups

With config.on_highlights(highlights, colors) you can override highlight groups. This can be used to better match your style or enable certain features of the LSP you might prefer.

require('nightcity').setup({
    on_highlights = function(groups, c)
        groups.String = { fg = c.green, bg = c.none }

        groups['@lsp.typemod.parameter.readonly'] = { italic = true }
        groups['@lsp.typemod.variable.readonly']  = { italic = true }
    end
})

Fix color and underlines in tmux

In order to show colors and undercurls and underlines in tmux probably you need to adjust your config file and add the following:

set -g default-terminal "tmux-256color"
# Truecolor (RGB) support
set -as terminal-overrides ',*:Tc'
# Undercurl support
# https://github.com/tmux/tmux/issues/1492#issuecomment-427939241
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
# Underscore colors
# https://github.com/tmux/tmux/pull/1771#issuecomment-500906522
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'

About

๐Ÿ™ Night City - A dark colorscheme for Neovim with LSP support

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published