Release (#440)
* Feat: Enable sorting discussions by original comment (#422) * Feat: Improve popup UX (#426) * Feat: Automatically update MR summary details (#427) * Feat: Show update progress in winbar (#432) * Feat: Abbreviate winbar (#439) * Fix: Note Creation Bug (#441) * Fix: Checking whether comment can be created (#434) * Fix: Syntax in discussion tree (#433) * fix: improve indication of resolved threads and drafts (#442) * Docs: Various minor improvements (#445) --------- Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
This commit is contained in:
committed by
GitHub
parent
be027331e1
commit
495e64c8bc
@@ -2,29 +2,26 @@ if filereadable($VIMRUNTIME . '/syntax/markdown.vim')
|
||||
source $VIMRUNTIME/syntax/markdown.vim
|
||||
endif
|
||||
|
||||
syntax match Date "\v\d+\s+\w+\s+ago"
|
||||
highlight link Date GitlabDate
|
||||
let expanders = '^\s*\%(' . g:gitlab_discussion_tree_expander_open . '\|' . g:gitlab_discussion_tree_expander_closed . '\)'
|
||||
let username = '@[a-zA-Z0-9.]\+'
|
||||
|
||||
execute 'syntax match Unresolved /\s' . g:gitlab_discussion_tree_unresolved . '\s\?/'
|
||||
highlight link Unresolved GitlabUnresolved
|
||||
" Covers times like '14 days ago', 'just now', as well as 'October 3, 2024'
|
||||
let time_ago = '\d\+ \w\+ ago'
|
||||
let formatted_date = '\w\+ \{1,2}\d\{1,2}, \d\{4}'
|
||||
let date = '\%(' . time_ago . '\|' . formatted_date . '\|just now\)'
|
||||
|
||||
execute 'syntax match Resolved /\s' . g:gitlab_discussion_tree_resolved . '\s\?/'
|
||||
highlight link Resolved GitlabResolved
|
||||
let published = date . ' \%(' . g:gitlab_discussion_tree_resolved . '\|' . g:gitlab_discussion_tree_unresolved . '\|' . g:gitlab_discussion_tree_unlinked . '\)\?'
|
||||
let state = ' \%(' . published . '\|' . g:gitlab_discussion_tree_draft . '\)'
|
||||
|
||||
execute 'syntax match GitlabDiscussionOpen /^\s*' . g:gitlab_discussion_tree_expander_open . '/'
|
||||
highlight link GitlabDiscussionOpen GitlabExpander
|
||||
execute 'syntax match GitlabNoteHeader "' . expanders . username . state . '" contains=GitlabDate,GitlabUnresolved,GitlabUnlinked,GitlabResolved,GitlabExpander,GitlabDraft,GitlabUsername'
|
||||
|
||||
execute 'syntax match GitlabDiscussionClosed /^\s*' . g:gitlab_discussion_tree_expander_closed . '/'
|
||||
highlight link GitlabDiscussionClosed GitlabExpander
|
||||
|
||||
execute 'syntax match Draft /' . g:gitlab_discussion_tree_draft . '/'
|
||||
highlight link Draft GitlabDraft
|
||||
|
||||
execute 'syntax match Username "@[a-zA-Z0-9.]\+"'
|
||||
highlight link Username GitlabUsername
|
||||
|
||||
execute 'syntax match Mention "\%(' . g:gitlab_discussion_tree_expander_open . '\|'
|
||||
\ . g:gitlab_discussion_tree_expander_closed . '\)\@<!@[a-zA-Z0-9.]*"'
|
||||
highlight link Mention GitlabMention
|
||||
execute 'syntax match GitlabDate "' . date . '" contained'
|
||||
execute 'syntax match GitlabUnresolved "' . g:gitlab_discussion_tree_unresolved . '" contained'
|
||||
execute 'syntax match GitlabUnlinked "' . g:gitlab_discussion_tree_unlinked . '" contained'
|
||||
execute 'syntax match GitlabResolved "' . g:gitlab_discussion_tree_resolved . '" contained'
|
||||
execute 'syntax match GitlabExpander "' . expanders . '" contained'
|
||||
execute 'syntax match GitlabDraft "' . g:gitlab_discussion_tree_draft . '" contained'
|
||||
execute 'syntax match GitlabUsername "' . username . '" contained'
|
||||
execute 'syntax match GitlabMention "' . username . '"'
|
||||
|
||||
let b:current_syntax = 'gitlab'
|
||||
|
||||
Reference in New Issue
Block a user