Skip to content
Proyectos

casedami/neomodern.nvim

Ver en GitHub

Acerca de

Colección de temas modernos para Neovim

Herramientas de desarrollo

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

NEOMODERN.nvim

modern — simple — unintrusive

Table of Contents

Gallery

🌚 MOON

A dark, spacy theme inspired by the colors of the moon

Dark Variant

image

Light Variant

image

❄️ ICECLIMBER

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

Dark Variant

image

Light Variant

image

🌱 GYOKURO

A fresh green tea inspired theme

Dark Variant

image

Light Variant

image

🍂 HOJICHA

A roasted green tea inspired theme

Dark Variant

image

Light Variant

image

🌷 ROSEPRIME

Inspired by ThePrimeagen's use of the Rosé-Pine theme

Dark Variant

image

Light Variant

image

Installation

Using vim.pack:

vim.pack.add({"https://github.com/casedami/neomodern.nvim"})
require("neomodern").setup({
-- optional configuration
})
require("neomodern").load()

Note, you only need to call setup if you are overriding any default opts. If you are only using it to set the theme, you could use the following instead:

vim.pack.add({"https://github.com/casedami/neomodern.nvim"})
require("neomodern").load("iceclimber")

Configuration

There are 5 themes included, each with a light and dark variant. The light theme is used when vim.o.background = "light".

Default options are given below:

require("neomodern").setup({
  -- 'default' default background
  -- 'alt' darker background
  -- 'transparent' background is not set
  bg = "default",

  theme = "moon", -- 'moon' | 'iceclimber' | 'gyokuro' | 'hojicha' | 'roseprime'

  gutter = {
    cursorline = false, -- highlight the cursorline in the gutter
    dark = false, -- highlight gutter darker than the Normal bg
  },

  diagnostics = {
    darker = true, -- use darker colors for diagnostics
    undercurl = true, -- use undercurl for diagnostics
    background = true, -- use a background color for diagnostics
  },

  -- override colors, see #Customization below
  overrides = {
    default = {},
    hlgroups = {}
  }
})
-- Call `load` after `setup`
require("neomodern").load()

Customization

Neomodern supports user-defined color overrides. The user can either override the default colors or alter the highlights of a specific highlight group. When overriding highlight groups, use neomodern's colors by prefixing the color name with a dollar sign (e.g. $keyword). See :h highlight-args and :h neomodern-types for expected args, default color names, etc.

require("neomodern").setup {
  overrides = {
    default = {
      keyword = '#817faf', -- redefine neomodern's `keyword` color
    }
    hlgroups = {
      ["@keyword.return"] = { gui = 'italic' },
      ["@keyword"] = { guifg = "$keyword", gui = 'bold' },
      ["@function"] = { guibg = "#ffffff" },
      ["String"] = { link = "Todo" },
    }
  },
}

Recipes

Prefer Treesitter Highlights

If you would prefer to bias the highlights towards treesitter (rather than lsp-semantic highlights), use this somewhere in your config:

vim.highlight.priorities.semantic_tokens = 95

Keymap to Swap Between Light/Dark variants

Neomodern uses vim.opt.background to decide which variant to load, so to toggle between variants simply toggle vim.opt.background.

vim.keymap.set("n", "<leader>uc", function()
    if vim.opt.background == "light" then
        vim.opt.background = "dark"
    else
        vim.opt.background = "light"
    end
end, { desc = "Toggle between light/dark mode" })

Contributing

If you are wanting support for a plugin or an extra please open an issue or submit a PR.

Inspiration

Explorar proyectos relacionados

Cargando…