neoclide/coc-json

tsconfig.json [json 521] [e] Comments are not permitted in JSON.

utrumo opened this issue ยท 5 comments

I suggest adding the ability to configure exceptions in the rules for some files.

Send your feature request to json language service.

Actually, vscode-json-languageservice support this extension.

But you need to add "allowComments": true to the schema file.

@dementor5

@forest0 can you describe what you mean by 'the schema file'?

You can configure your vim to make that file with jsonc filetype to allow comment.

@chemzqm yea that's what I ended up doing instead, thanks for pointing it out ๐Ÿ™ .

For others reading along I installed 'neoclide/jsonc.vim' and pointed out to vim that tsconfig.json is really a jsonc file.

" tsconfig.json is actually jsonc, help TypeScript set the correct filetype
autocmd BufRead,BufNewFile tsconfig.json set filetype=jsonc