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

Odd Highlighting On Greek and Sub/Superscripts #149

Closed
duncanam opened this issue Apr 10, 2019 · 8 comments · Fixed by #261
Closed

Odd Highlighting On Greek and Sub/Superscripts #149

duncanam opened this issue Apr 10, 2019 · 8 comments · Fixed by #261

Comments

@duncanam
Copy link

After being able to successfully install and use Nord on vim quite nicely, I did notice a quirky thing that may or may not be intentional and I was wondering if there was a setting to turn it off or if it was indeed a bug. I am using a plugin in vim that will render some of my LaTeX expressions as Greek characters inline, and will apply sub and superscripts to them. The Nord theme seems to highlight these:
nordissue

Current output: highlights Greek and sub/superscript
Desired output: no highlighting of Greek and sub/superscript

Is there anything I can do about this, or is just outright unsupported (which is fine too, although it would be neat if there was a solution).

@arcticicestudio
Copy link
Contributor

It is more likely that the plugin uses custom syntax keys. This would require to add support for them to Nord to make it work properly. Could you please post the name and/or the link to the GitHub repository of the plugin?

@duncanam
Copy link
Author

@arcticicestudio Certainly, it's Vimtex, and found here:
https://github.com/lervag/vimtex

Anything else I can do to help?

@duncanam
Copy link
Author

Well, I reached out to @gillescastel and he said to add hi Conceal ctermbg=none in my .vimrc and this worked for me. I no longer have the odd highlighting and everything is working as expected!

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Apr 24, 2019

@duncanam Nice to hear it works fine now 🎉
I haven't got the time to take a look into this, but the solution will also help other users facing the same problem. I've added a note to the backlog to add it to Nord Vim's docs/troubleshooting guide 😄
→ This has been documented in #256 and solved in #261.

@xarthurx
Copy link

xarthurx commented Jul 2, 2020

hi Conceal ctermbg=none doesn't work for me here.
Neovim for Windows 10.

I found some post here:
kaicataldo/material.vim#12
for the 'material` theme, as they add some defined colour to the scheme.

Could we also do it for Nord?

@Bobby-Huggins
Copy link

For anyone else running into this issue:

hi Conceal ctermbg=none didn't work for me, because I am using a gui version (gVim on Windows 10).
However, hi Conceal guibg=NONE works, but only if it comes after set background=dark

The full theme section of my _vimrc is then:

if (has("termguicolors"))
  set termguicolors
endif
colorscheme nord
set background=dark
hi Conceal guibg=NONE

@nikinbaidar
Copy link

Well, I reached out to @gillescastel and he said to add hi Conceal ctermbg=none in my .vimrc and this worked for me. I no longer have the odd highlighting and everything is working as expected!

This works perfect.

arcticicestudio added a commit that referenced this issue May 28, 2021
The `Conceal` group was not supported which could have led to rendering
problems for (Unicode) characters that require special encoding like
the ones from the Greek alphabet [1] that are often used in LaTeX [3] or
Pandoc [4] documents. These characters were highlighted with the default
background color which makes them kind of unreadable with the theme
foreground color.
See `:help conceal` and `:help concealcursor` for more details about
concealing in Vim.

To fix the problem, the `Conceal` group has been added with its
background color set to `NONE` for GUI and terminal mode to either use
the terminal default background color or let loaded scripts apply custom
styles based on the current runtime context.

The problem has been reported in GH-149, GH-207 and GH-211 with LaTeX
and Pandoc being used by the reporters. PR GH-220 adds support for
vim-pandoc/vim-pandoc-syntax [5] specific highlighting groups and can be
merged after adding basic support for `Conceal`.

[1]: https://en.wikipedia.org/wiki/Greek_alphabet
[2]: https://www.overleaf.com/learn/latex/mathematical_expressions
[3]: https://www.latex-project.org
[4]: https://pandoc.org
[5]: https://github.com/vim-pandoc/vim-pandoc-syntax

Co-authored-by: Sven Greb <development@svengreb.de>

GH-256
arcticicestudio added a commit that referenced this issue May 28, 2021
The `Conceal` group was not supported which could have led to rendering
problems for (Unicode) characters that require special encoding like
the ones from the Greek alphabet [1] that are often used in LaTeX [3] or
Pandoc [4] documents. These characters were highlighted with the default
background color which makes them kind of unreadable with the theme
foreground color.
See `:help conceal` and `:help concealcursor` for more details about
concealing in Vim.

To fix the problem, the `Conceal` group has been added with its
background color set to `NONE` for GUI and terminal mode to either use
the terminal default background color or let loaded scripts apply custom
styles based on the current runtime context.

The problem has been reported in GH-149, GH-207 and GH-211 with LaTeX
and Pandoc being used by the reporters. PR GH-220 adds support for
vim-pandoc/vim-pandoc-syntax [5] specific highlighting groups and can be
merged after adding basic support for `Conceal`.

[1]: https://en.wikipedia.org/wiki/Greek_alphabet
[2]: https://www.overleaf.com/learn/latex/mathematical_expressions
[3]: https://www.latex-project.org
[4]: https://pandoc.org
[5]: https://github.com/vim-pandoc/vim-pandoc-syntax

Co-authored-by: Sven Greb <development@svengreb.de>

Closes GH-256
@arcticicestudio
Copy link
Contributor

@duncanam @xarthurx @Bobby-Huggins @nikinbaidarr Thanks for your help 👍
The problem has been documented in #256#261 (⊶ f3f28b9) and will be shipped in version 0.16.0.

@arcticicestudio arcticicestudio added this to the 0.16.0 milestone Jun 9, 2021
crispgm pushed a commit to crispgm/nord-vim that referenced this issue Jun 10, 2021
The `Conceal` group was not supported which could have led to rendering
problems for (Unicode) characters that require special encoding like
the ones from the Greek alphabet [1] that are often used in LaTeX [3] or
Pandoc [4] documents. These characters were highlighted with the default
background color which makes them kind of unreadable with the theme
foreground color.
See `:help conceal` and `:help concealcursor` for more details about
concealing in Vim.

To fix the problem, the `Conceal` group has been added with its
background color set to `NONE` for GUI and terminal mode to either use
the terminal default background color or let loaded scripts apply custom
styles based on the current runtime context.

The problem has been reported in nordthemeGH-149, nordthemeGH-207 and nordthemeGH-211 with LaTeX
and Pandoc being used by the reporters. PR nordthemeGH-220 adds support for
vim-pandoc/vim-pandoc-syntax [5] specific highlighting groups and can be
merged after adding basic support for `Conceal`.

[1]: https://en.wikipedia.org/wiki/Greek_alphabet
[2]: https://www.overleaf.com/learn/latex/mathematical_expressions
[3]: https://www.latex-project.org
[4]: https://pandoc.org
[5]: https://github.com/vim-pandoc/vim-pandoc-syntax

Co-authored-by: Sven Greb <development@svengreb.de>

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

Successfully merging a pull request may close this issue.

6 participants