diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2023-01-07 08:20:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-07 08:20:55 -0700 |
commit | f601c4b1ca9051c5ffa6a7543e0851ae86127041 (patch) | |
tree | 9aebd6a2fc687bb775fc0b12def1a23cdfeb6e12 | |
parent | 363633844903331ae1d6383de2fef329db08b5e3 (diff) | |
download | rneovim-f601c4b1ca9051c5ffa6a7543e0851ae86127041.tar.gz rneovim-f601c4b1ca9051c5ffa6a7543e0851ae86127041.tar.bz2 rneovim-f601c4b1ca9051c5ffa6a7543e0851ae86127041.zip |
fix(editorconfig): do not highlight unknown properties as errors (#21673)
Other plugins may define their own custom properties outside of Neovim's
builtin EditorConfig support. Instead of highlighting these unknown
properties as errors, do not highlight them at all.
This still differentiates between known and unknown properties, which
helps to catch typos or mistakes, but does not use the garish "error"
highlight that signals something is wrong.
-rw-r--r-- | runtime/syntax/editorconfig.vim | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/syntax/editorconfig.vim b/runtime/syntax/editorconfig.vim index 006b99cec5..4392d2b2d5 100644 --- a/runtime/syntax/editorconfig.vim +++ b/runtime/syntax/editorconfig.vim @@ -1,7 +1,7 @@ runtime! syntax/dosini.vim unlet! b:current_syntax -syntax match editorconfigInvalidProperty "^\s*\zs\w\+\ze\s*=" +syntax match editorconfigUnknownProperty "^\s*\zs\w\+\ze\s*=" syntax keyword editorconfigProperty root lua<< @@ -12,7 +12,6 @@ end vim.cmd(string.format('syntax keyword editorconfigProperty %s', table.concat(props, ' '))) . -hi def link editorconfigInvalidProperty Error hi def link editorconfigProperty dosiniLabel let b:current_syntax = 'editorconfig' |