Skip to content

cdmill/neomodern.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEOMODERN.nvim

A collection of themes (4 dark, 1 light) written in Lua for Neovim $\geq$ 0.9. Support for Treesitter syntax highlighting and LSP semantic highlighting. Forked from OneDark.nvim.

Themes have been designed to be unintrusive, simple, and pleasing to the eyes.

Gallery

ICECLIMBER

A dark theme with colors inspired from Nintendo's Ice Climbers characters

Click to toggle previews

image

COFFEECAT

A dark, brown pastel theme

Click to toggle previews

image

DARKFOREST

A darker, greener take on the classic Everforest theme

Click to toggle previews

image

ROSEPRIME

Inspired by ThePrimeagen's use of the Rosé-Pine theme with tmux and no color fixing.

Click to toggle previews

image

DAYLIGHT

A light variant of ICECLIMBER

Click to toggle previews

image

Installation

Install via your favorite package manager:

-- Using lazy.nvim
{
  "cdmill/neomodern.nvim",
  lazy = false,
  priority = 1000,
  config = function()
    require("neomodern").setup({
      -- optional configuration here
    })
    require("neomodern").load()
  end,
},

Note

require("neomodern").load() will call set colorscheme with your chosen theme. If you prefer, you can use vim.cmd("colorscheme <theme>") instead. For example, to use darkforest: vim.cmd("colorscheme darkforest"). Note if you use vim.cmd("colorscheme neomodern"), iceclimber will be used.

Configuration

There are 5 themes included (4 dark, 1 light). The light theme is used when { style = "daylight" } is passed to setup(options) or when vim.o.background = "light".

Default options are given below

require("neomodern").setup({
  -- MAIN OPTIONS --
  -- Choose between 'iceclimber', 'coffeecat', 'darkforest', 'roseprime', 'daylight'
  theme = "iceclimber",
  -- Keymap (in normal mode) to toggle between themes in theme list
  cycle_theme_key = nil,
  cycle_theme_list = { "iceclimber", "coffeecat", "darkforest", "roseprime", "daylight" },
  -- Keymap (in normal mode) to toggle between light and dark mode.
  -- Recommended to remove `daylight` from `toggle_theme_list` if you are also using
  -- `cycle_theme_key` keymap for a more intuitive cycle behavior
  toggle_mode_key = nil,
  -- Don't set background
  transparent = false,
  -- If true, enable the terminal
  term_colors = true,
  -- If true, docstrings will be highlighted like strings, otherwise they will be highlighted
  -- like comments. Note, behavior is depending on the language server.
  colored_docstrings = true,
  -- If false, brackets will be highlighted similar to the default fg color
  colored_brackets = true,
  -- Don't set background of floating windows. Recommended for when using floating windows
  -- with borders.
  plain_float = false,
  -- Show the end-of-buffer tildes
  show_eob = true,
  -- If true, highlights {sign,fold}column the same as cursorline
  cursorline_gutter = true,
  diagnostics = {
    darker = true, -- Darker colors for diagnostic
    undercurl = true, -- Use undercurl for diagnostics
    background = true, -- Use background color for virtual text
  },

  -- CODE FORMATTING --
  -- The following table accepts values the same as the `gui` option for normal
  -- highlights. For example, `bold`, `italic`, `underline`, `none`.
  code_style = {
    comments = "italic",
    conditionals = "none",
    functions = "none",
    keywords = "none",
    -- Markdown headings
    headings = "bold",
    operators = "none",
    keyword_return = "none",
    strings = "none",
    variables = "none",
  },

  -- PLUGINS --
  -- The following options allow for more control over some plugin appearances.
  plugin = {
    lualine = {
      -- Bold lualine_a sections
      bold = true,
      -- Don't set section/component backgrounds. Recommended to not set
      -- section/component separators.
      plain = false,
    },
    cmp = {
      -- Don't highlight lsp-kind items. Only the current selection will be highlighted.
      plain = false,
      -- Reverse lsp-kind items' highlights in cmp menu.
      reverse = false,
    },
    -- Options are 'borderless' or 'bordered'.
    telescope = "bordered",
  },

  -- CUSTOM HIGHLIGHTS --
  -- Override default colors
  colors = {},
  -- Override highlight groups
  highlights = {},
})
-- Convenience function that simply calls `:colorscheme <theme>` with the theme
-- specified in your config. If not specified, `iceclimber` is used.
require("neomodern").load()

Images for Select Config Opts

Bordered Telescope

image

Borderless Telescope

image

Normal Lualine

image

Plain Lualine

image

Example setup for plain cmp (preview below):

-- Use these opts in setup and also rounded borders enabled in your lsp config
require("neomodern").setup({
  plain_float = true,
  plugin = {
    cmp = {
      plain = true,
    },
  },
})
Click to toggle preview for plain cmp

image

Customization

Example using custom colors and highlights:

require("neomodern").setup {
  colors = {
    orange = '#ff8800', -- define a new color
    keyword = '#817faf', -- redefine an existing color
  },
  highlights = {
    ...
    ["@keyword"] = { fg = "$keyword", fmt = 'bold' },
    ["@function"] = { bg = "$orange", fmt = 'underline,italic' },
    ...
  },
}

Note

Treesitter keywords have changed for Neovim $\geq$ 0.8.

Supported Plugins

Extras

Available here

Contributing

Pull requests are welcome.

If you are wanting to submit a new theme/style, please create a pull request with your new colors in this file.

If you are wanting support for a plugin, either open an issue or submit a pull request with your highlight additions in this file.

Inspiration

License

MIT