elzr/vim-json

missing comma syntax error

acornejo opened this issue · 3 comments

A very common mistake when editing json files, is to forget to add a comma, or to add an extra one.

vim-json already detets extra commas, but it does not detect missing ones.

Here is a minimal example of an invalid json file which is not highlighted for errors by vim-json:

{
  "object1": "value1"
  "object2": "value2"
}

Id like to see that one too.

elzr commented

Hey guys, thanks for bringing this one up. It had been on the backburner for months because of some Vim weirdness (apparently concealing the quotes made me unable to reuse them in another syntax highlighting match). But today I finally hacked my way through! This common slip should now produce a syntax error :)

sweet =3