VSCode 中具有语义突出显示的语言服务器 [英] Language server with semantic highlight in VSCode

本文介绍了VSCode 中具有语义突出显示的语言服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为 VSCode 编写一个支持语义高亮支持的语言服务器.我使用的语言有非常复杂的规则,所以我不想依赖分词器来区分标识符和关键字.

I'd like to write a language server to VSCode with semantic highlight support. The language I'm using has very complex rules, so I'd like not to rely on a tokenizer to distinguish between identifiers and keywords.

我已经在 VS 社区 中提供了一个语言服务,我在那里编写了自己的分类器.可以在 VSCode 中编写自己的分类器,或者给文档着色的唯一方法是将 TextMate 语言规范文件添加到 VScode 包中?

I already have a language service in VS Community, where I've written my own Classifier. It's possible to write own classifier in VSCode, or the only way to colorize a document is add TextMate language specification file to a VScode package?

推荐答案

从 VS Code 1.29 开始,LSP 不支持语义着色.

Semantic coloring is not supported by the LSP as of VS Code 1.29.

目前跟踪此功能有两个主要问题:

There are two main issues currently tracking this feature:

  • LSP issue
  • VS Code issue which tracks adding semantic coloring to the VS Code api

这篇关于VSCode 中具有语义突出显示的语言服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆