Skip to content

Commit

Permalink
Add support for pandoc (#220)
Browse files Browse the repository at this point in the history
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 <[email protected]>
Co-authored-by: Sven Greb <[email protected]>

Closes GH-220
  • Loading branch information
tpoisot authored and arcticicestudio committed Sep 12, 2021
1 parent 7e8d8ab commit 9c8ecad
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions colors/nord.vim
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,31 @@ hi! link jsNoise Delimiter
hi! link jsPrototype Keyword
hi! link jsRegexpString SpecialChar

" Pandoc
" > vim-pandoc/vim-pandoc-syntax
call s:hi("pandocDefinitionBlockTerm", s:nord7_gui, "", s:nord7_term, "", s:italic, "")
call s:hi("pandocTableDelims", s:nord3_gui, "", s:nord3_term, "", "", "")
hi! link pandocAtxHeader markdownH1
hi! link pandocBlockQuote markdownBlockquote
hi! link pandocCiteAnchor Operator
hi! link pandocCiteKey pandocReferenceLabel
hi! link pandocDefinitionBlockMark Operator
hi! link pandocEmphasis markdownItalic
hi! link pandocFootnoteID pandocReferenceLabel
hi! link pandocFootnoteIDHead markdownLinkDelimiter
hi! link pandocFootnoteIDTail pandocFootnoteIDHead
hi! link pandocGridTableDelims pandocTableDelims
hi! link pandocGridTableHeader pandocTableDelims
hi! link pandocOperator Operator
hi! link pandocPipeTableDelims pandocTableDelims
hi! link pandocReferenceDefinition pandocReferenceLabel
hi! link pandocReferenceLabel markdownLinkText
hi! link pandocReferenceURL markdownUrl
hi! link pandocSimpleTableHeader pandocAtxHeader
hi! link pandocStrong markdownBold
hi! link pandocTableHeaderWord pandocAtxHeader
hi! link pandocUListItemBullet Operator

" tree-sitter
" > nvim-treesitter/nvim-treesitter
if has("nvim")
Expand Down

0 comments on commit 9c8ecad

Please sign in to comment.