[英]how can I add my own error messagess and intellisense to a JSON file in visual-studio-code
I'm building a tool that validates that a JSON file conforms to my custom requirements.我正在构建一个工具来验证 JSON 文件是否符合我的自定义要求。
I can let the tool spit out the error messages in the terminal, but I'd rather see these errors be marked in the JSON document itself.我可以让该工具在终端中吐出错误消息,但我宁愿看到这些错误被标记在 JSON 文档本身中。
And if possible, I would also like to add code completion for string values in that document.如果可能,我还想为该文档中的字符串值添加代码完成。
I have tried to google it, and this link seems promising: programmatic-language-features .我试图用谷歌搜索它,这个链接似乎很有希望: programmatic-language-features 。 Can you confirm this is the right way forward, or tell me which approach might be more suitable您能否确认这是正确的前进方式,或者告诉我哪种方法可能更合适
To answer my own question: yes: the 'programmatic language features' is one of the 2 ways to do it.回答我自己的问题:是的:“编程语言功能”是两种方法之一。 The other being: 'language-server-extension' In my case, I realized that my best option is most likely forking the JSON-lanugage-server and make the necessary changes另一个是:'language-server-extension' 就我而言,我意识到我最好的选择很可能是分叉JSON-lanugage-server并进行必要的更改
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.