nordtheme / vim

An arctic, north-bluish clean and elegant Vim theme.
https://www.nordtheme.com/ports/vim
MIT License
2.52k stars 275 forks source link

Add support for neovim 0.6.0 diagnostic API highlight groups #282

Closed jan-xyz closed 2 years ago

jan-xyz commented 2 years ago

The highlight groups introduced in Neovim 0.5.0 specifically for LSP have been changed in neovim 0.6.0 to a general purpose Diagnostics API.

See: https://github.com/neovim/neovim/blob/99f6260f84a8ef94495c831155d98c330078e0ad/runtime/doc/diagnostic.txt#L187

This makes sure that Nord works with the new version of neovim. However, it keeps compatibility with the previous highlight groups used in 0.5.0.

Try it out in packer:

packer.use({
    "jan-xyz/nord-vim",
    branch = "jan-xyz-patch-1",
    config = function()
        vim.cmd("colorscheme nord")
    end,
})

Thanks for taking your time and working on this <3 Jan

arcticicestudio commented 2 years ago

Hi @jan-xyz :wave:, thanks for your contribution :+1: Even though major version 0 means that everything can break at any time, it feels like the Neovim maintainers change names faster than their underpants 🙈

Anyway, I guess we should keep the previous groups and guard it with a Neovim version check to continue to support nvim<0.6 users, at least until the official Nord Neovim port is available.

jan-xyz commented 2 years ago

Sounds reasonable! I will get to it as soon as possible

arcticicestudio commented 2 years ago

Please do not rush over the Christmas holidays, spending time with the family and loved ones is more important than some lines of code.

jan-xyz commented 2 years ago

[...] we should keep the previous groups and guard it with a Neovim version check to continue to support nvim<0.6 users, at least until the official Nord Neovim port is available.

I applied that change, and guard now the old LspDiagnostic... highlight groups with a version check. Can you have another look?

jan-xyz commented 2 years ago

First, happy new year 🎉🍀

Same to you! 💟