Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for neovim 0.6.0 diagnostic API highlight groups #282

Merged
merged 4 commits into from Jan 1, 2022

Conversation

jan-xyz
Copy link
Contributor

@jan-xyz jan-xyz commented Dec 1, 2021

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

emilford added a commit to emilford/dotfiles that referenced this pull request Dec 9, 2021
TomBosmans added a commit to TomBosmans-dotfiles/nvim that referenced this pull request Dec 15, 2021
Nord maintainer is not responding on the following pr: nordtheme/vim#282.
Currently diagnostics colors are broken in nord theme as the highlight groups changed in nevoid 0.6.0
emilford added a commit to emilford/dotfiles that referenced this pull request Dec 17, 2021
@arcticicestudio arcticicestudio added this to the Next milestone Dec 25, 2021
@arcticicestudio
Copy link
Contributor

arcticicestudio commented Dec 25, 2021

Hi @jan-xyz 👋, thanks for your contribution 👍
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
Copy link
Contributor Author

jan-xyz commented Dec 25, 2021

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

@arcticicestudio
Copy link
Contributor

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

emilford added a commit to emilford/dotfiles that referenced this pull request Dec 27, 2021
emilford added a commit to emilford/dotfiles that referenced this pull request Dec 27, 2021
emilford added a commit to emilford/dotfiles that referenced this pull request Dec 27, 2021
emilford added a commit to emilford/dotfiles that referenced this pull request Dec 27, 2021
emilford added a commit to emilford/dotfiles that referenced this pull request Dec 27, 2021
emilford added a commit to emilford/dotfiles that referenced this pull request Dec 27, 2021
@jan-xyz
Copy link
Contributor Author

jan-xyz commented Dec 28, 2021

[...] 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 jan-xyz changed the title migrate to neovim 0.6.0 highlight groups Add support for neovim 0.6.0 diagnostic API highlight groups Dec 28, 2021
Copy link
Contributor

@arcticicestudio arcticicestudio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First, happy new year 🎉🍀
The guard looks good to me, thanks again 👍🏻

@jan-xyz
Copy link
Contributor Author

jan-xyz commented Jan 1, 2022

First, happy new year 🎉🍀

Same to you! 💟

@jan-xyz jan-xyz deleted the jan-xyz-patch-1 branch January 1, 2022 20:33
jcypret pushed a commit to jcypret/nord-vim-midnight that referenced this pull request Feb 19, 2022
…me#282)

In Neovim `0.6.0` [1] the naming scheme for the highlight groups of the
diagnostic API changed [2]. The new groups have been added as default while
the previous groups are conditionally guarded when using Neovim `0.5.0`.

[1]: https://github.com/neovim/neovim/releases/tag/v0.6.0
[2]: neovim/neovim@a5bbb93#diff-51fab2b766d0a3b606462e95de492190df173b7296147912307cdad636cd492aR77


Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com>
Co-authored-by: Sven Greb <development@svengreb.de>

nordthemeGH-282
crispgm added a commit to crispgm/nord-vim that referenced this pull request Apr 2, 2022
arcticicestudio pushed a commit that referenced this pull request May 14, 2022
In Neovim `0.6.0` [1] the naming scheme for the highlight groups of the
diagnostic API changed [2]. The new groups have been added as default while
the previous groups are conditionally guarded when using Neovim `0.5.0`.

[1]: https://github.com/neovim/neovim/releases/tag/v0.6.0
[2]: neovim/neovim@a5bbb93#diff-51fab2b766d0a3b606462e95de492190df173b7296147912307cdad636cd492aR77


Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com>
Co-authored-by: Sven Greb <development@svengreb.de>

GH-282
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants