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 pandoc #220

Merged
merged 3 commits into from Jul 11, 2021
Merged

Conversation

tpoisot
Copy link
Contributor

@tpoisot tpoisot commented Aug 2, 2020

The current version of nord-vim does not have support for most syntax elements from the vim-pandoc-syntax package (#207):

before

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:

after

@BirgerNi
Copy link

BirgerNi commented Aug 7, 2020

Hej @tpoisot,

just tested your pull request, good job. Do you use an option like hi Conceal guibg=NONE ctermbg=NONE in your .vimrc?

  1. Pull request w/o conceal option in .vimrc
    1

  2. Pull request w/ conceal option in .vimrc
    2

  3. develop branch w/ conceal option in .vimrc
    3

@tpoisot
Copy link
Contributor Author

tpoisot commented Aug 8, 2020

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.

@BirgerNi
Copy link

BirgerNi commented Aug 8, 2020

I'm okay with that. I guess at least some documentation would be nice for new users. Any thoughts @arcticicestudio ?

@lompabo
Copy link

lompabo commented Apr 21, 2021

Anyone for reviewing this? Pandoc support is currently the main factor preventing me from switching to this theme

arcticicestudio added a commit that referenced this pull request 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 pull request 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 arcticicestudio added this to the 0.16.0 milestone May 29, 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.

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

colors/nord.vim Outdated Show resolved Hide resolved
@tpoisot
Copy link
Contributor Author

tpoisot commented Jun 8, 2021

@arcticicestudio - will have a look, thanks for the feedback!

@arcticicestudio arcticicestudio modified the milestones: 0.16.0, Next Jun 9, 2021
crispgm pushed a commit to crispgm/nord-vim that referenced this pull request 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
@arcticicestudio
Copy link
Contributor

@tpoisot Let me know if you'd like to apply the suggestions so I can resolve the current merge conflicts.

@tpoisot
Copy link
Contributor Author

tpoisot commented Jul 10, 2021

I would love to, hopefully I'll find the time next week

@arcticicestudio arcticicestudio modified the milestones: 0.17.0, Next Jul 10, 2021
tpoisot and others added 2 commits July 10, 2021 14:17
Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com>
@tpoisot
Copy link
Contributor Author

tpoisot commented Jul 10, 2021

I think the merge conflicts are gone!

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.

LGTM 👍🏼 Thanks again for your contribution.

@arcticicestudio arcticicestudio merged commit 8d8b9bf into nordtheme:develop Jul 11, 2021
crispgm pushed a commit to crispgm/nord-vim that referenced this pull request Jul 14, 2021
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
arcticicestudio pushed a commit that referenced this pull request Sep 12, 2021
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
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

5 participants