GithubHelp home page GithubHelp logo

shaunsingh / nord.nvim Goto Github PK

View Code? Open in Web Editor NEW
783.0 5.0 103.0 238 KB

Neovim theme based off of the Nord Color Palette, written in lua with tree sitter support

License: GNU General Public License v2.0

Lua 100.00%
nord nvim colorscheme neovim theme

nord.nvim's Introduction

nord.nvim's People

Contributors

alaz-oz avatar antoineco avatar arjuns500 avatar coloradocolby avatar crdueck avatar dakennguyen avatar delafthi avatar echasnovski avatar emilio avatar ergpopler avatar felipesere avatar freddiehaddad avatar gbprod avatar guillaumeallain avatar hierosme avatar isrothy avatar jurica avatar kranzes avatar mwcz avatar nikolaisch avatar ryantking avatar shaunsingh avatar silverrainz avatar slotos avatar tapayne88 avatar thenerdyhamster avatar wendersonbarros avatar wuliuqii avatar yelite avatar yogaflre 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  avatar

nord.nvim's Issues

ColorColumn foreground color

First of all, thank you for this theme.

I was wondering why the foreground color of ColorColumn is set to nord.nord0_gui instead of nord.none? In my opinion it would make more sense to leave the text color as it is. The following image shows a file using markdown syntax with the current foreground color.
colorcolumn_fg

Cursorline not visible

Hi,

Firstly, thanks so much for creating this plugin - I've been using Nord for a long time, but the lack of support for treesitter meant I had to move elsewhere, so great to be able to move back :)

Just a question, not necessarily a bug. At the moment, cursorline is currently set to nord.none, so isn't visible. On the original vim plugin, it's set to nord1_gui (https://github.com/arcticicestudio/nord-vim/blob/5867535cea7bb6b4c219fa0726c93e4b055debd2/colors/nord.vim#L170)

However, on the original plugin, colorcolumn & cursorline conflicted as they were both using nord1_gui. As you're using nord.active for colorcolumn, this means that we could use nord.nord1_gui and support both features.

Was it an intentional decision to have cursorline invisible, or would it be possible to have it changed to nord1_gui?

Thanks!

colors are off on MacOS and Alacritty

Hi,
Any idea why some of the colors are completely off on my installation?

OS: MacOS BigSur
alacritty --version
alacritty 0.9.0

nvim --version

Build type: Release
LuaJIT 2.1.0-beta3
Compilation: clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/build/config -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/src -I/usr/local/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include -I/usr/local/opt/gettext/include -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/build/src/nvim/auto -I/tmp/neovim-20210927-1441-demfsz/neovim-0.5.1/build/include
Compiled by brew@BigSur

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.5.1/share/nvim"

Run :checkhealth for more info 


--Lua Options
vim.cmd('syntax on')
vim.o.shortmess = vim.o.shortmess .. 'c'
vim.o.laststatus=0
vim.o.hidden = true
vim.o.whichwrap = 'b,s,<,>,[,],h,l'
vim.o.pumheight = 10
vim.o.fileencoding = 'utf-8'
vim.o.cmdheight = 2
vim.o.splitbelow = true
vim.o.splitright = true
vim.opt.termguicolors = true
vim.o.conceallevel = 0
vim.o.showtabline = 2
vim.o.showmode = true
vim.o.backup = false
vim.o.writebackup = false
vim.o.updatetime = 300
vim.o.timeoutlen = 100
vim.o.clipboard = "unnamedplus"
vim.o.hlsearch = false
vim.o.ignorecase = true
vim.o.scrolloff = 8
vim.o.sidescrolloff = 5
vim.o.mouse = "a"
vim.wo.wrap = true
vim.wo.number = true
vim.o.cursorline = true
vim.wo.signcolumn = "yes"
vim.o.rnu=true
vim.o.tabstop = 4
vim.bo.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
vim.bo.shiftwidth = 4
vim.o.autoindent = true
vim.bo.autoindent = true
vim.o.expandtab = true
vim.bo.expandtab =true

--Lua Plugins config 

return require('packer').startup(function()
  use 'wbthomason/packer.nvim'

  --  use {
    --'hoob3rt/lualine.nvim',
    --requires = {'kyazdani42/nvim-web-devicons', opt = true}
  --}
  use {'akinsho/bufferline.nvim', requires = 'kyazdani42/nvim-web-devicons'}
  use {
    'kyazdani42/nvim-tree.lua',
    requires = 'kyazdani42/nvim-web-devicons'
  }
  use {'windwp/nvim-ts-autotag'}
  use {'p00f/nvim-ts-rainbow'}
  use {'windwp/nvim-autopairs'}
  use {'folke/which-key.nvim'}
  use {
    'nvim-telescope/telescope.nvim',
    requires = { {'nvim-lua/plenary.nvim'} }
  }
  use 'neovim/nvim-lspconfig'
  use 'hrsh7th/cmp-nvim-lsp'
  use 'hrsh7th/cmp-buffer'
  use 'hrsh7th/nvim-cmp'
  use 'hrsh7th/cmp-vsnip'
  use 'hrsh7th/vim-vsnip'
  use 'onsails/lspkind-nvim'
  use {'nvim-treesitter/nvim-treesitter', run = ":TSUpdate"}
  use 'shaunsingh/nord.nvim'

end)

Screen capture of how neovim looks with nord enabled

Screen Shot 2021-10-12 at 11 54 26 AM

[thread] Plugin highlight requests

As lua in neovim improves, more and more neovim plugins are starting to pop up. Personally, I try to keep my config light on plugins, so its becoming impossible for me to watch new plugins and add their highlights to the theme quickly

If any of you use plugins that you would like theme highlights for, let me know

  1. What plugin it is (link to repo)
  2. What highlight groups does it supply
  3. What colors would you ideally want

And I will add it as soon as I get time

nord_contrast not working

I have nord_contrast set to true and though it is set that way I still have ivim-tree opening with the same background. I am not sure it this a current bug.
Screen Shot 2022-02-16 at 10 49 58 AM

Function names not distinct

Ive noticed that function names in various treesitter languages have the same color as built ins key words, another example is in golang type name struct{} all have the same color.
Is this intended? Ive done a cross comparrison with a few other nord themes, vs code for example, and they do have colors for the functions names, although they have a lot less color for many other things so i do prefer this nvim port.

Screenshot 2021-09-14 at 07 21 46

Screenshot 2021-09-14 at 07 21 49

Italic disappears when Treesitter is enabled

Italic disappears when Treesitter is enabled.
Here is how it looks:
Снимок экрана 2021-10-14 в 18 54 41

And here is how it looks if I enable additional_vim_regex_highlighting = true:

Снимок экрана 2021-10-14 в 18 54 17

Is this expected behavior?

Setting `nord_disable_background` has no effect

Using neovim:

NVIM v0.5.0
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

it appears that I'm doing something wrong or the value I set for nord_disable_background does not reach the relevant code in theme.lua.

I use a vim-script config and tried setting before and after loading the plugin, but no effect:

[ ... truncated ... ]
let g:nord_disable_background = 1

" Load vim-plug plugins
call plug#begin()
Plug 'sheerun/vim-polyglot'
Plug 'ryanoasis/vim-devicons'
Plug 'preservim/nerdtree'
Plug 'pearofducks/ansible-vim'
Plug 'Yggdroot/indentLine'
Plug 'itchyny/lightline.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'shaunsingh/nord.nvim'
call plug#end()

colorscheme nord
let g:nord_disable_background = 1
[ ... truncated ... ]

However, when I comment out the if vim.g.nord_disable_background == true then statement in theme.lua so that it unconditionally always sets the editor.Normal color to nord.none, then it works.

Support for italic comments via global setting

I love this colour scheme and have been using it for a few weeks, thanks. There's only one little thing missing from the original Nord theme that I think is very useful, the g:nord_italic_comments setting.

It was implemented here.

YAML not working propoerly

After some debugging, I found that the current theme does not work on YAML files.

Using the normal nord (no treesitter) theme:
screenshop1

Using the normal nord (no treesitter) theme:

With nord.vim:
screenshop2

Am I doing something wrong there?

colors are washed

Hi,

me again :) after filing the feature request, i saw the intro picture again while my nvim was open.
Now it bugs me, that my colors are not that strong like yours and i don't see why

image

Do you have any idea what the cause can be?

Kind regards, Alexander

When using `require('nord').set()` the set function is called twice

I was trying to customize a few highlight groups in the packer config function by doing something like this:

config = function()
    require('nord').set()
    local util = require('nord.util')
    local colors = require('nord.colors')
    util.highlight('WhichKey', {bg = colors.nord_gui0})
end

And noticed that highlights weren't sticking. Via the power of print statements I determined that after the config function, the ret function was being called a second time via:

require('nord').set()

I got my highlights working by doing them in a separate module, but I figured that this was probably not desired behavior? Could also be a user error.

Mechanic for customizing individual colors

👋 Thank you for making nord.nvim!

Do you think its possible to add a mechanic to override colours for specific groups?
For example, I'd like to use a different (Nord) colour for structs in Rust.

I'd be happy to contribute 😸

Disable bold style

Right now the theme doesn't seems to have the option to disable bold styles in the code.
Screen Shot 2022-02-10 at 16 30 50

Is it possible to override local syntax highlight group?

Hi!

Is it possible to override local syntax highlight group? I'm trying to make statusline of the active window a little bit brighter. One can modify the StatusLine in theme.lua. But is possible to override its value in init.lua?

I have (unsuccessfully) tried something like this:

use {
  'shaunsingh/nord.nvim',
  config = function() 
    vim.cmd[[colorscheme nord]]
    vim.g.nord_italic = true
    StatusLine = { fg = nord.nord4_gui, bg = nord.nord2_gui }
end,
}

What is the correct way to override StatusLine?

Thank you!

IndentBlanklineChar too bright

I would suggest either making this configurable, or changing it to a darker colour like the nord.comments colour... the current white is way too bright when you have deeply nested code.

colorcolumn looks weird

It seems colorcolumns is not supported and showed as two bright blue columns. It think it should be a color that requires less attention.

image

Highligh colours contrast

screenshot

This is what I get when I search for something, here ook. The text could maybe be black or at least darker to contract on the white-ish background. I am not 100% if this is a Nord thing…

Again, ignore the background colour. I changed it to suite my awful tastes.

'nord_disable_background' should apply to all telescope floating windows

First off, thanks for your work on this colorscheme.

I'd like to use my terminal's background colour throughout neovim's UI. I'm reproducing with a minimal init.lua which installs packer, nord.nvim and configures the colorscheme

vim.g.nord_disable_background = true
require("nord").set()

The theme looks correct for the main editing window and telescope's file preview, but the Results and Find Files floating windows aren't using the terminal background.

Screen Shot 2021-10-27 at 11 58 19 AM

How can I configure nord.nvim so that all of telescope's floating windows use the terminal background color?

Having issues with installing nord.nvim

Here is the error i get

Error detected while processing /home/ryan/.config/nvim/plugged/nord.nvim/colors/nord.vim:
line    9:
E5105: Error while calling lua chunk: .../ryan/.config/nvim/plugged/nord.nvim/lua/nord/colors.lua:44: attempt to index field 'g' (a nil value)

And then here is my init.vim

call plug#begin()
Plug 'sheerun/vim-polyglot'
Plug 'ryanoasis/vim-devicons'
Plug 'preservim/nerdtree'
Plug 'pearofducks/ansible-vim'
Plug 'Yggdroot/indentLine'
Plug 'itchyny/lightline.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'shaunsingh/nord.nvim'
call plug#end()

colorscheme nord

How to override default highlight groups

I'm trying to override the default highlight groups with my custom ones. For example, when trying to change the guifg color of the NvimTreeEndOfBuffer group (to hide the ~ characters like the screenshot in the README), those changes don't take effect. I'm doing the following:

require "nord".set()
vim.cmd[[hi NvimTreeEndOfBuffer guifg=#2E3440]]

Also tried using vim.cmd[[colo nord]] and using the nord.util.highlight function, but none of those worked for me. Any ideas on how to override any highlight group? Thanks.

Confused about color being used in vim files and the bufferline used in the screenshot

Really appreciate you stepping up and creating this project and loving it. I'm confused about one thing though. One of the colors used for files with the vim filetype doesn't seem to belong to the Nord colorscheme and I'm confused if this is because of some misconfiguration on my end or if this is intentional.

image

Another question I had is what is the tabline/bufferline being used in the screenshot you've shared in the readme. It looks amazing and since nvim-bufferline seems to be the only bufferline that's supported, I tried it out but can't get the look that you have going on.

Issues with colorscheme

  1. nord_italic option doesn't work properly.
    • Looks like logic is inverted (need to set it to false in order to enable italics):
      if vim.g.nord_italic == false then
      syntax.Conditional = { fg = nord.nord9_gui, bg = nord.none, style = 'italic' } -- italic if, then, else, endif, switch, etc.
      syntax.Keyword = { fg = nord.nord9_gui, bg = nord.none, style = 'italic' } -- italic for, do, while, etc.
      syntax.Repeat = { fg = nord.nord9_gui, bg = nord.none, style = 'italic' } -- italic any other keyword
      syntax.Comment = { fg = nord.nord3_gui_bright, bg = nord.none, style = 'italic' } -- italic comments
      syntax.Function = { fg = nord.nord8_gui, bg = nord.none, style = 'italic' } -- italic funtion names
      syntax.Identifier = { fg = nord.nord9_gui, bg = nord.none, style = 'italic' }; -- any variable name
      syntax.String = { fg = nord.nord14_gui, bg = nord.none, style= 'italic' } -- any string
      else
      syntax.Comment = {fg = nord.nord3_gui_bright} -- normal comments
      syntax.Conditional = { fg = nord.nord9_gui } -- normal if, then, else, endif, switch, etc.
      syntax.Keyword = { fg = nord.nord9_gui } -- normal for, do, while, etc.
      syntax.Repeat = { fg = nord.nord9_gui } -- normal any other keyword
      syntax.Function = { fg = nord.nord8_gui} -- normal function names
      syntax.Identifier = { fg = nord.nord9_gui}; -- any variable name
      syntax.String = { fg = nord.nord14_gui } -- any string
      end
    • Treesitter highlights doesn't use it, so it doesn't work at all if treesitter is enabled:
      local treesitter = {
    • Is it possible to enable italics only for comments?
  2. LSP highlights are white on white:
    LspReferenceText = { fg = nord.nord4_gui, bg = nord.nord4_gui }, -- used for highlighting "text" references
    LspReferenceRead = { fg = nord.nord4_gui, bg = nord.nord4_gui }, -- used for highlighting "read" references
    LspReferenceWrite = { fg = nord.nord4_gui, bg = nord.nord4_gui }, -- used for highlighting "write" references
  3. Same for NeogitHunkHeader:
    NeogitHunkHeader = { fg = nord.nord4_gui, bg = nord.nord4_gui },
  4. I think there is pretty poor choice for search highlights. For example IncSearch is highlighted with white. If text is already white, then it's unreadable. And even regular search-highlight changes text color to white with slight background. Usually it's the opposite, highlighted text has prominent background color instead of erasing syntax highlighting. Maybe style = 'reverse' shouldn't be used there?
    Normal color:
    Screenshot 2021-08-09 165722
    Search highlight for nor:
    Screenshot 2021-08-09 165620
  5. Also I'd like to point out that "async" is pretty useless here:
    async = vim.loop.new_async(vim.schedule_wrap(function ()

    It doesn't improve startuptime at all. It just delays execution of a function to some later time, but you still can't use neovim until it's done. You can try to add os.execute("sleep 10") anywhere in your async function, than run neovim. You'll see, that neovim isn't responding for 10 seconds after startup. So this async just complicates code, trick profiler, but doesn't improve loading time.

airline-vim Nord theme colours

screenshot1

The above is using nord-vim with airline-vim's nord theme.

screenshot2

This is what I see using your code.

Note: please do ignore the background colour, I changed it to match my weird and abject tastes.

feat: styles for romgrk/barbar.nvim

Hi,

can you add styles for romgrk/barbar.nvim? Or can you give me a hint, where i can get and add stylings for bufferlines? (I could pr you then).

Kind regards, Alexander

None 24-bit color terminal compatibility

It's a great theme and I love it. It works on almost terminal emulators. Although, like some terminals (e.g. Apple Terminal.app) which doesn't support truecolor (24-bit) fails to show the color scheme correctly. Is it possible to modify the theme for such terminal emulators?

Syntax highlighting not working with treesitter!

Image:
Screenshot from 2021-08-23 16-33-32

Issue: No syntax highlighting for cpp ?

Code :

lua << EOF
require'nvim-treesitter.configs'.setup {
  ensure_installed = {"c", "cpp", "css", "scss", "html", "javascript", "typescript", "json", "vim"}, 
  highlight = {
    enable = true,
    additional_vim_regex_highlighting = false
  },
}
EOF

Blame in gitsigns not visible when using cursorline

The current-line blame feature of Gitsigns is not visible when cursorline is on. Even with cursorline off, it's very hard to read. In gitsigns that text has a highlight group of GitSignsCurrentLineBlame.

Using cursorline:
image

No cursorline:
image

I can push a PR but I'm not sure what to set the colors to.

Incorrect treesitter hightlighting

The syntax highlighting of nord.nvim (nord vim too) don't follow the same syntax highlighting as other themes when using treesitter's highlighting functionality.
Notice the lack of highlighting in the outputsBuilder part.

See below:

  • First image - nord.nvim + treesitter
  • Second image - nord.nvim only
  • Third image - default nvim theme + treesitter
  • Fourth image - dracula + treesitter
    image
    image
    image
    image

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.