mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 19:25:11 -07:00
f601c4b1ca
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.
18 lines
439 B
VimL
18 lines
439 B
VimL
runtime! syntax/dosini.vim
|
|
unlet! b:current_syntax
|
|
|
|
syntax match editorconfigUnknownProperty "^\s*\zs\w\+\ze\s*="
|
|
syntax keyword editorconfigProperty root
|
|
|
|
lua<<
|
|
local props = {}
|
|
for k in pairs(require('editorconfig').properties) do
|
|
props[#props + 1] = k
|
|
end
|
|
vim.cmd(string.format('syntax keyword editorconfigProperty %s', table.concat(props, ' ')))
|
|
.
|
|
|
|
hi def link editorconfigProperty dosiniLabel
|
|
|
|
let b:current_syntax = 'editorconfig'
|