Mercurial > vim
annotate runtime/syntax/editorconfig.vim @ 32705:31b68cad57cc
Highlight editorconfig properties with dashes (#12691)
Commit: https://github.com/vim/vim/commit/958e15bb1c7d582cdca324dc61a4daf5c01842bc
Author: ObserverOfTime <chronobserver@disroot.org>
Date: Wed Aug 9 18:05:39 2023 +0300
Highlight editorconfig properties with dashes (https://github.com/vim/vim/issues/12691)
Problem: editorconfig properties with dashes are not highlighted
Solution: update the property pattern to include dashes
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 09 Aug 2023 17:15:03 +0200 |
parents | 5ed19049b1e8 |
children |
rev | line source |
---|---|
31671 | 1 " Vim syntax file |
2 " Language: EditorConfig | |
3 " Maintainer: Gregory Anders <greg@gpanders.com> | |
32705
31b68cad57cc
Highlight editorconfig properties with dashes (#12691)
Christian Brabandt <cb@256bit.org>
parents:
31671
diff
changeset
|
4 " Last Change: 2023-07-20 |
31671 | 5 |
6 if exists('b:current_syntax') | |
7 finish | |
8 endif | |
9 | |
10 runtime! syntax/dosini.vim | |
11 unlet! b:current_syntax | |
12 | |
32705
31b68cad57cc
Highlight editorconfig properties with dashes (#12691)
Christian Brabandt <cb@256bit.org>
parents:
31671
diff
changeset
|
13 syntax match editorconfigUnknownProperty "^\s*\zs[a-zA-Z0-9_-]\+\ze\s*=" |
31671 | 14 |
15 syntax keyword editorconfigProperty root charset end_of_line indent_style | |
16 syntax keyword editorconfigProperty indent_size tab_width max_line_length | |
17 syntax keyword editorconfigProperty trim_trailing_whitespace insert_final_newline | |
18 | |
19 hi def link editorconfigProperty dosiniLabel | |
20 | |
21 let b:current_syntax = 'editorconfig' |