From f601c4b1ca9051c5ffa6a7543e0851ae86127041 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Sat, 7 Jan 2023 08:20:55 -0700 Subject: 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. --- runtime/syntax/editorconfig.vim | 3 +-- 1 file changed, 1 insertion(+), 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' -- cgit