Git Product home page Git Product logo

onenord.nvim's Introduction

๐Ÿ”๏ธ onenord.nvim

Screenshot of the onenord theme

Screenshot of the onenordlight theme

Features

OneNord is a Neovim theme written in Lua that combines the Nord and Atom One Dark color palettes. More specifically, it seeks to add more vibrance to the Nord theme and provide a great programming experience by leveraging Treesitter!

Plugin Support

Requirements

  • Neovim >= 0.8.0

Installation

Install via your favourite package manager:

" If you are using Vim Plug
Plug 'rmehri01/onenord.nvim', { 'branch': 'main' }
-- If you are using Packer
use 'rmehri01/onenord.nvim'

Usage

For the defaults, simply enable the colorscheme:

" Vim Script
colorscheme onenord
-- Lua
require('onenord').setup()

To enable the onenord theme for Lualine, specify it in your lualine settings:

require('lualine').setup {
  options = {
    -- ... your lualine config
    theme = 'onenord'
    -- ... your lualine config
  }
}

Configuration

The configuration of different options is done through a setup function which will handle setting the colors, so there's no need to set colorscheme yourself! This is an example of the function with the default values:

require('onenord').setup({
  theme = nil, -- "dark" or "light". Alternatively, remove the option and set vim.o.background instead
  borders = true, -- Split window borders
  fade_nc = false, -- Fade non-current windows, making them more distinguishable
  -- Style that is applied to various groups: see `highlight-args` for options
  styles = {
    comments = "NONE",
    strings = "NONE",
    keywords = "NONE",
    functions = "NONE",
    variables = "NONE",
    diagnostics = "underline",
  },
  disable = {
    background = false, -- Disable setting the background color
    float_background = false, -- Disable setting the background color for floating windows
    cursorline = false, -- Disable the cursorline
    eob_lines = true, -- Hide the end-of-buffer lines
  },
  -- Inverse highlight for different groups
  inverse = {
    match_paren = false,
  },
  custom_highlights = {}, -- Overwrite default highlight groups
  custom_colors = {}, -- Overwrite default colors
})

Here is an example of overwriting the default highlight groups and colors:

local colors = require("onenord.colors").load()

require("onenord").setup({
  custom_highlights = {
    ["@constructor"] = { fg = colors.dark_blue },
  },
  custom_colors = {
    red = "#ffffff",
  },
})

If you use the light and dark keys, the override will be specific to those themes, otherwise they apply to both:

local colors = require("onenord.colors").load()

require("onenord").setup({
  custom_highlights = {
    light = {
      ["@constructor"] = { fg = colors.dark_blue }, -- only applies in light theme
    },
  },
  custom_colors = {
    blue = "#0000ff", -- applies in both themes
    light = {
      red = "#000000", -- only applies in light theme
    },
    dark = {
      red = "#ffffff", -- only applies in dark theme
    },
  },
})

You can also use the OneNord color palette for other plugins using local colors = require("onenord.colors").load()!

Extras

Extra color configs for Kitty, Alacritty, iTerm, Warp, and Xresources can be found in extras. To use them, refer to their respective documentation.

An example of the Kitty onenord theme

There is also a version for JetBrains IDEs if you are interested!

Credits

I was highly inspired by these other awesome themes, check them out!

onenord.nvim's People

Contributors

amarakon avatar coralpink avatar dakennguyen avatar dav-cho avatar dependabot[bot] avatar duament avatar karyanayandi avatar kndndrj avatar liamblake avatar qanyue avatar rmehri01 avatar slotos avatar smjonas avatar steef435 avatar svipas avatar tinusgraglin avatar uaitt avatar wcampbell0x2a avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

onenord.nvim's Issues

Incorrect colors in Gnome Terminal (and derivates)

I don't think it's and upstream problem because this is the only colorscheme that does this.

The highlight color of "empty" character like tabs, are not shown correctly by Gnome Terminal and derivates like Tilix, the color is displayed correctly by other terminal like Alacritty

How to reproduce:

  • Lauch nvim with Gnome Terminal (or derivates)
  • Add content with tabs
  • Move the cursor over the tabs, incorrect color is shown

tilix:
image
gnome terminal:
image

alacritty:
image

Installation issue with Plug

A fairly minor issue, and it could be something in my own setup that's causing this, but it seems that using Plug defaults to a branch named master rather than main. So, to install, users may need to use:

Plug 'rmehri01/onenord.nvim', { 'branch': 'main' }

Might be worth mentioning in the README.

(And thanks for putting this together! It looks fantastic.)

Problems with Lspsaga integration

Hello,
I am trying to set up the Lspsaga integration for this theme:

my .config/nvim/lua/plugins/lspsaga.lua:

return {
  "glepnir/lspsaga.nvim",
  dependencies = {
    "nvim-treesitter/nvim-treesitter",
  },
  lazy = false,
  config = function()
    require("lspsaga").setup({
      ui = {
        kind = require("onenord.integrations.lspsaga").custom_kind(),
      },
    })
  end,
}

When I open neovim I get this:
Screenshot 2024-05-28 at 12 33 11

If I replace the setup table with an empty table Neovim does not give any error.

A few more infos:

NVIM v0.10.0
LuaJIT 2.1.1713484068

lspsaga
commit 59d4648

not sure if I'm doing something wrong since I am Neovim newbie, but hope somebody can help ๐Ÿ˜„.

FR: change the appearance of non current windows (in split view)

Hi!

Currently the only way to distinguish between current and non current window in split view is setting a special color to a statusline when it's window is non current.

ะกะฝะธะผะพะบ ัะบั€ะฐะฝะฐ 2021-12-10 ะฒ 14 18 28

As far as I see there are other ways to do this. What about adding an options:

  1. Use alt background color when window is non current (dim the color a little)
  2. Disable the cursor line highlighting when window is non current

Any other ideas?

I'm pretty sure this may be a great QoL enhancement. What do you think?

Update Docs!

Hi, I just wanted to let you know the docs for adding custom_hightlights should probably be updated. I just spent way too long trying to figure out why your example was not working to realize tree-sitter changed their highlight group names for Neovim 0.8... ๐Ÿ˜… Or at least mention the potential conflict in the docs since you also have a tagged release for 0.7.

Thank you for this awesome theme btw!

Issue with matching HTML bracket color in Vue SFC

I've noticed a little problem with some opening HTML bracket colors being incorrectly set in Vue single-file components (see screenshot).

In line 3 and 7, the opening angle bracket is colored yellow. If I move my cursor over this line, the color corrects itself. Any ideas what might be happening here?

Screen Shot 2021-11-05 at 11 20 26

Support tree-sitter-markdown highlight groups

MDeiml/tree-sitter-markdown is a new Markdown parser for Treesitter that (among other things) improves speed and uses Treesitter to highlight embedded code blocks.The parser is still experimental, but it's already a big improvement over traditional syntax highlighting, so it would be great to have support for it here. I asked the author on Reddit how colorschemes can support it, and they said:

They would need to add colors for the highlight groups TSTitle, TSLiteral, TSEmphasis, TSStrong, TSURI, TSTextReference, TSPunctSpecial and TSStringEscape.

For reference, this commit shows how Catpuccin implemented support.

Highlights overriding not working

Heya! Thanks for the lovely plugin, very pleasing and a great improvement from the original nord colorscheme. I was trying to change the way highlights are displayed on cursor hold the same way you explained in #26:

Schermata 2022-05-25 alle 16 29 09

But the overriding doesn't seem to be applied:

Schermata 2022-05-25 alle 16 29 19

I imported colors with local colors = require('onenord.colors') but I'm not 100% sure that's how it works, could you help me?

LspSignatureActiveParameter highlight

Hi,

Neovim 0.6 introduced hl group for highlighting active parameter in signature help popup (see :help hl-LspSignatureActiveParameter). I think having it link by default to something would be great. I guess Visual would be appropriate, but I'll leave that decision to you.

Add new color 'dark_gray' (#3B4252)

Hey there, me again :) I'd love a couple more grays from the Nord palette, specifically #3b4252 as either dark_gray or maybe bg_light. What do you think?

Color Highlighting Issue in NvimTree

Files that are executable seem to have a green that doesn't match the rest of the theme. This might be my setup but I couldn't find anything in my config.

Screen Shot 2021-12-02 at 2 23 06 PM

[feature request: inverse matches

In https://github.com/srcery-colors/srcery-vim there is an option to inverse the colour of matches and match parenthesis of treesitter-highlight module or a / search:
image
image

Could you please add a similar feature to onenord? Because I think this can improve visibility of these matches, as you see its currently a bit hard to see without inverse colours.
image

Change QuickFixLine highlight

I cannot distinguish selected quickfix line with the others
Screen Shot 2021-12-10 at 13 58 05

Currently I have this line in my config QuickFixLine = { style = 'italic' }, but I think we should have a default value
Screen Shot 2021-12-10 at 13 59 29

Feature request - light mode

Hi, I love the combination of one and nord theme. Nord theme doesn't support light mode, but one theme has light mode. Maybe this is too much to ask but what do you think about having a light mode for onenord? At first, we can build it from onelight's colors, and then create our own light version of nord later where we see fit.

If you are interested, I'm willing to give a hand if you need any help ๐Ÿ˜„

Getting wrong colors with Alacritty

Hi,
Your theme looks cool so I'd like to try it. Installation seemed easy enough and there was even mention of plug-and-play with Alacritty. My Alacritty itself has nord palette, but wanted to apply yours to neovim since you cover programming keywords and whatnot, but the color scheme doesn't seem to be applied correctly.

Here are some screenshots. Mostly, it seems to be the background that's having problems.

1662817402-s
1662817469-s
1662817493-s
1662817504-s

Note: when saving my plugins.lua file it did download your package. I'm using Packer.

I tried disabling the background with the disable option in .setup() but that didn't seem to work either.

Highlight colors are different after updating highlight groups to nvim-0.8

Hi, thank you for making this plugin, I really love it.

Recently after the commit 98c6465, many of the colors inside nvim became different from what they were before. Here are some screenshots:

Colors before the update:
Screen Shot 2022-10-19 at 21 18 16

Colors after the update:
Screen Shot 2022-10-19 at 21 17 28

I am unsure whether the changes were introduced by the tree-sitter or this plugin, but I found if I use a commit before this one 98c6465, the colors won't change.

All blue blackground color

I just installed the colorscheme, but when I change it over, it gives me this:

Screen Shot 2022-01-02 at 1 05 49 AM

My complete init.vim file is as such:

Screen Shot 2022-01-02 at 1 06 10 AM

Apologies if this isn't the right place to put it - brand new to the nvim community, any help would be greatly appreciated!

Colorscheme light/dark

Is there a way to make the light variant of the colorscheme visible in the list of colorschemes?
Like for example catpuccing where you have 4 variants: catpuccing-mocha, catpuccin-latte.,...
It would be nice to have onenord, onenord-light.

Right now there is only onenord and depending of the config you give it (via theme = dark/light) it will be dark or light.

Reasoning behind this is that it would make it easy to switch between them depending the time of the day.

Override lualine onenord theme

hey, cool colors.

I want to overwrite one of the option from within my init file, but I can't seem to find the syntax that would do this. Any ideas?

onenord.command = {
  a = { fg = colors.bg, bg = colors.yellow, gui = "bold" },
  b = { fg = colors.yellow, bg = colors.highlight },
}

Colors too dark for it be "Nord" themed in Nvim

Hi there,

I'm just a beginner trying to setup nvim. I have installed your theme but for me the colors feel to dark:

image

I'm using Alacritty, I use the same background color / theme you provide and there the blue feels good, like the nord theme. However if you look at nvim it's too dark. I have explicitly set the background hex color to same as in Alacritty but they are not the same. What am I missing?

colors/onenord.vim missing

I think if you create an empty file or one with just a comment for "colors/onenord.vim", then the color scheme will show up is the color scheme completions.

I use the colorscheme switcher plugin, and that definitely won't pick up this scheme because of the missing file.

Bracket coloring in Lua files

I've been waiting for someone to merge these two color palettes, so thanks!

I've noticed that matching braces {} are colored differently in some files (yellow in Lua - see screenshot), as opposed to JavaScript files for instance. Is that intentional?

Screen Shot 2021-10-30 at 23 53 21

If so, is there a way to override this behavior to have uniformity across all filetypes? Thanks!

Add inlay hints support

Hi!

Could we add specific highlighting for LspInlayHint? By default it's linked to NonText, but I think it's best to add background for it as well.

For now I've added custom highlighting:

require("onenord").setup({
    ...
	custom_highlights = {
		LspInlayHint = { fg = colors.light_gray, bg = colors.active },
		...,
     }
}

Which produces:
image

This looks nice, but we might wanna consider smth more in-line with the colorscheme.

Thanks for a great theme!

LuaLine Issues

My lualine with onenord appears to be a bit difficult to read and doesn't seem to look like the one in the screen shot of the theme.
Screen Shot 2021-11-01 at 12 49 40 PM

How to change underline on cursor hold

Hello, thanks for a great plugin. How I can I change underline style when cursor is on hold to just highlight the references?
I have this functions in my config

local function lsp_highlight_document(client)
  -- Set autocommands conditional on server_capabilities
  if client.resolved_capabilities.document_highlight then
    vim.api.nvim_exec(
      [[
      augroup lsp_document_highlight
        autocmd! * <buffer>
        autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
        autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
      augroup END
    ]],
      false
    )
  end
end

As a result I want references to be highlighted not underlined.
Screenshot_2021-12-26_17-54-12

Lightspeed colors seem off

Some of the colors Onenord uses for lightspeed.nvim cause issues when using the plugin. For example, Lightspeed highlights all of the unique characters in the viewport, but these are quite hard to see when using Onenord:

Screen Shot 2021-11-03 at 12 18 02 PM

For comparison, here's the same view when using the Nordfox theme from nightfox.nvim:

Screen Shot 2021-11-03 at 12 18 16 PM

Likewise, the colors used when jumping are a bit confusing. Here, the first character indicates a match, and the second character indicates the character that will jump to that match, but they're so similar that it's hard to know which is which at a glance:

Screen Shot 2021-11-03 at 12 18 34 PM

I think Nordfox doesn't modify these colors at all, so they're pretty ugly, but you can see that there's a lot of contrast between the first and second characters, which makes it easier to parse:

Screen Shot 2021-11-03 at 12 18 56 PM

I'd put in a PR, but I'm frankly inept when it comes to anything color-related. I saw that the author of Lightspeed just updated the guidelines for color scheme integration, so maybe that could provide some guidance.

Can No longer Override With Custom Highlights

Hello and thank you very much for this awesome color scheme! It's easy to use and looks great! I'm not sure when exactly it happened or what caused it, but my custom highlights no longer override the stock ones. Here's my current config file. I know it loads fine and every part of the config works except for the custom highlights. I'm sure it's something I'm doing. Thank you in advance!

local colors = require('onenord.colors')

require('onenord').setup({
  theme = "dark",
  borders = true,
  face_nc = true,
  styles = {
    comments = "italic",
    strings = "italic",
    keywords = "italic",
    functions = "italic",
    variables = "NONE",
    diagnostics = "underline",
  },
  disable = {
    background = false,
    cursorline = false,
    eob_lines = true,
  },
  custom_highlights = {

    -- NvimTree
    NvimTreeOpenedFile = { fg = colors.diff_add, style = 'bold' },

    -- Local Syntax
    Conditional = { fg = colors.blue },
    Number = { fg = colors.purple },
    Operator = { fg = colors.dark_blue },
    Statement = { fg = colors.fg },
    MatchParen = { fg = colors.light_purple, bg = colors.none, style = 'bold' },

    -- TreeSitter
    TSBoolean = { fg = colors.yellow },

    -- BarBar
    BufferCurrentMod = { fg = colors.purple, bg = colors.bg, style = 'bold' },
    BufferVisibleMod = { fg = colors.purple, bg = colors.bg, style = 'bold' },
    BufferInactiveMod = { fg = colors.purple, bg = colors.bg, style = 'bold' },
  },
})

HTML custom elements

Hello ๐Ÿ‘‹ ! Is there a way to make html custom elements look the same as regular html elements? Also attributes as well.
Thanks!

image

FR: setup option to use default nord palette

Hi @rmehri01, I've been rocking this theme for quite a while and it is lovely, so thanks for your hard work!

I was wondering if it would be possible to add an option to override highlight groups to use the default nord color palette without having to do it manually. I think it would be great to just have a quick flag to switch between your implementation and the default one without having to add or remove a lot of override options.

E185: Cannot find color scheme 'onenord'

First off thanks a lot for putting this theme together it looks really amazing.

I am running into a somewhat strange issue where Plug seems to have successfully installed onenord via the following command: Plug 'rmehri01/onenord.nvim', { 'branch': 'main' } but when colorscheme onenord gets called i get the following error message from my init.vim

E185: Cannot find color scheme 'onenord'

I've tried installing and uninstalling a few times, I've installed other plugins in the meantime all work apart from this one.

I'm not sure how to help more with debugging but if you have any ideas I'll be happy to try them.

feature request: inverse matches

In srcery-vim there is an option to inverse the colour of matches and match parenthesis of treesitter-highlight module or a / search:
image
image

Could you please add a similar feature to onenord? Because I think this can improve visibility of these matches.

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.