1
0
mirror of https://github.com/amix/vimrc synced 2025-02-28 14:12:51 +08:00
amix-vimrc-mirror/sources_non_forked/copilot.vim/syntax/copilot.vim
2024-10-06 10:25:50 +02:00

20 lines
597 B
VimL

scriptencoding utf-8
if exists("b:current_syntax")
finish
endif
let s:subtype = matchstr(&l:filetype, '\<copilot\.\zs[[:alnum:]_-]\+')
if !empty(s:subtype) && s:subtype !=# 'copilot'
silent! exe 'syn include @copilotLanguageTop syntax/' . s:subtype . '.vim'
unlet! b:current_syntax
endif
syn region copilotHeader start="\%^" end="^─\@="
syn region copilotPanelItem matchgroup=copilotSeparator start="^─\{9,}$" end="\%(^─\{9,\}$\)\@=\|\%$" keepend contains=@copilotLanguageTop
hi def link copilotHeader PreProc
hi def link copilotSeparator Comment
let b:current_syntax = "copilot"