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

Fix/treesitter markup #118

Merged
merged 3 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ slightly earthy tone.
- [g:srcery\_italic](#gsrcery_italic)
- [g:srcery\_underline](#gsrcery_underline)
- [g:srcery\_undercurl](#gsrcery_undercurl)
- [g:srcery\_strikethrough](#gsrcery_strikethrough)
- [g:srcery\_inverse](#gsrcery_inverse)
- [g:srcery\_inverse\_matches](#gsrcery_inverse_matches)
- [g:srcery\_inverse\_match\_paren](#gsrcery_inverse_match_paren)
Expand Down Expand Up @@ -242,6 +243,12 @@ Enables undercurled text.

Default: 1

#### g:srcery\_strikethrough

Enables strikethrough text.

Default: 1

#### g:srcery\_inverse

Enable or disable inverse highlighting (foreground becomes background,
Expand Down
20 changes: 13 additions & 7 deletions after/plugin/srcery.vim
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ let s:italic = g:srcery#palette.italic
let s:underline = g:srcery#palette.underline
let s:undercurl = g:srcery#palette.undercurl
let s:inverse = g:srcery#palette.inverse
let s:strikethrough = g:srcery#palette.strikethrough

" }}}
" Sneak: {{{
Expand Down Expand Up @@ -265,13 +266,13 @@ if has('nvim')
highlight! link @text.strong TSStrong
highlight! link @text.emphasis TSEmphasis
highlight! link @text.underline TSUnderline
highlight! link @text.warning TSWarning
highlight! link @text.danger TSDanger
highlight! link @constant.builtin TSConstBuiltin
highlight! link @field TSField
highlight! link @function.builtin TSFuncBuiltin
highlight! link @function.macro TSFuncMacro
highlight! link @function TSFunction
highlight! link @text.warning TSWarning
highlight! link @text.danger TSDanger
highlight! link @constant.builtin TSConstBuiltin
highlight! link @field TSField
highlight! link @function.builtin TSFuncBuiltin
highlight! link @function.macro TSFuncMacro
highlight! link @function TSFunction
highlight! link @namespace TSNamespace
highlight! link @parameter TSParameter
highlight! link @property TSProperty
Expand All @@ -284,6 +285,11 @@ if has('nvim')
highlight! link @text.uri TSURI
highlight! link @variable TSVariable

call srcery#helper#Highlight('@markup.strong', s:none, s:none, s:bold)
call srcery#helper#Highlight('@markup.italic', s:none, s:none, s:italic)
call srcery#helper#Highlight('@markup.underline', s:none, s:none, s:underline)
call srcery#helper#Highlight('@markup.strikethrough', s:none, s:none, s:strikethrough)

endif
endif

Expand Down
9 changes: 9 additions & 0 deletions autoload/srcery.vim
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ if !exists('g:srcery_underline')
let g:srcery_underline=1
endif

if !exists('g:srcery_strikethrough')
let g:srcery_strikethrough=1
endif

if !exists('g:srcery_inverse')
let g:srcery_inverse=1
endif
Expand Down Expand Up @@ -267,6 +271,11 @@ if g:srcery_inverse == 0
let g:srcery#palette.inverse = ''
endif

let g:srcery#palette.strikethrough = 'strikethrough,'
if g:srcery_strikethrough == 0
let g:srcery#palette.strikethrough = ''
endif

" }}}

" Setup Terminal Colors For Neovim: {{{
Expand Down
8 changes: 8 additions & 0 deletions doc/srcery.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Options |srcery-options|
g:srcery_italic |srcery-option-italic|
g:srcery_underline |srcery-option-underline|
g:srcery_undercurl |srcery-option-undercurl|
g:srcery_strikethrough |srcery-option-strikethrough|
g:srcery_inverse |srcery-option-inverse|
g:srcery_inverse_matche |srcery-option-inverse-matches|
g:srcery_inverse_match_paren |srcery-option-inverse-match-paren|
Expand Down Expand Up @@ -172,6 +173,13 @@ g:srcery_undercurl

Enables undercurled text.

Default: 1

*srcery-option-strikethrough*
g:srcery_strikethrough

Enables strikethrough text.

Default: 1

*srcery-option-inverse*
Expand Down