Home > Back-end >  Getting Error on commented JSON lines on Neovim
Getting Error on commented JSON lines on Neovim

Time:12-14

enter image description here

Editing tsconfig.json file my neovim is a nightmare. All the commented section for this json file is highlighted in red color. Its only for json files.

CodePudding user response:

tsconfig.json is not JSON. It is actually the poorly specified manual

  • Add a :help modeline to your JSONC files:

    // vim: filetype=jsonc
    

    modeline

  • Set up proper filetype detection by putting this file under ~/.vim/ftdetect/, as per this document.

    • Related