-
-
Notifications
You must be signed in to change notification settings - Fork 274
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 pandoc #220
Conversation
Hej @tpoisot, just tested your pull request, good job. Do you use an option like |
You're right, I did have that! Should it be added to the theme? I'm not sure how it can interact with other packages. |
I'm okay with that. I guess at least some documentation would be nice for new users. Any thoughts @arcticicestudio ? |
Anyone for reviewing this? Pandoc support is currently the main factor preventing me from switching to this theme |
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
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tpoisot 👋, thanks for your contribution 👍
Thanks for your patience, the large amount of tasks for the Nord project are really time consuming and free time is kind of rare.
I've suggested some changes to make it more consistent with existing theme styles. Let me know what you think about it.
Configuration and resources used for testing:
let g:pandoc#syntax#conceal#cchar_overrides = {"atx": "〉"}
let g:nord_italic = 1
@arcticicestudio - will have a look, thanks for the feedback! |
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
@tpoisot Let me know if you'd like to apply the suggestions so I can resolve the current merge conflicts. |
I would love to, hopefully I'll find the time next week |
Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com>
I think the merge conflicts are gone! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏼 Thanks again for your contribution.
Add support for `vim-pandoc/vim-pandoc-syntax` To improve syntax highlighting for Pandoc [1], support for the vim-pandoc/vim-pandoc-syntax [2] plugin has been implemented. Most groups are linked to existing Markdown groups to ensure a consistent style across languages and different plugins. Configurations used for testing: ```vim let g:pandoc#syntax#conceal#cchar_overrides = {"atx": "〉"} let g:nord_italic = 1 ``` Resources: - `g:pandoc#syntax#conceal#cchar_overrides` docs [3] - `s:cchars` definition [4] - Markdown "Extended Syntax" Guide [5] [1]: https://pandoc.org [2]: https://github.com/vim-pandoc/vim-pandoc-syntax [3]: https://github.com/vim-pandoc/vim-pandoc-syntax/blob/68d7249/doc/pandoc-syntax.txt#L45-L50 [4]: https://github.com/vim-pandoc/vim-pandoc-syntax/blob/5056e63/syntax/pandoc.vim#L37-L72 [5]: https://www.markdownguide.org/extended-syntax Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com> Co-authored-by: Sven Greb <development@svengreb.de> Closes nordthemeGH-220
Add support for `vim-pandoc/vim-pandoc-syntax` To improve syntax highlighting for Pandoc [1], support for the vim-pandoc/vim-pandoc-syntax [2] plugin has been implemented. Most groups are linked to existing Markdown groups to ensure a consistent style across languages and different plugins. Configurations used for testing: ```vim let g:pandoc#syntax#conceal#cchar_overrides = {"atx": "〉"} let g:nord_italic = 1 ``` Resources: - `g:pandoc#syntax#conceal#cchar_overrides` docs [3] - `s:cchars` definition [4] - Markdown "Extended Syntax" Guide [5] [1]: https://pandoc.org [2]: https://github.com/vim-pandoc/vim-pandoc-syntax [3]: https://github.com/vim-pandoc/vim-pandoc-syntax/blob/68d7249/doc/pandoc-syntax.txt#L45-L50 [4]: https://github.com/vim-pandoc/vim-pandoc-syntax/blob/5056e63/syntax/pandoc.vim#L37-L72 [5]: https://www.markdownguide.org/extended-syntax Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com> Co-authored-by: Sven Greb <development@svengreb.de> Closes GH-220
The current version of
nord-vim
does not have support for most syntax elements from thevim-pandoc-syntax
package (#207):I have added support for these groups - notably, this solves the issues with
Conceal
(notably #211). This is the result with the additional syntax groups: