haskell / haskell/haskell-language-server

Syntax highlighting in doctest comments?

未关闭
#1,535 5 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看
component: lsp status: blocked type: enhancement
主要语言
Haskell
星标
3k
派生
455
平均合并
2 天 19 小时
30 天内合并 PR
11

描述

I've been using the Eval Plugin of HLS, which provides us with a pleasant alternative for REPL.
That plugin provides a way to evaluate (or execute some simple ghci-like commands such as `type`) codes in doctest style comment: `-- >>>`.
The result is appended as line comments right after the doctest comments.

In some situation, both of the inputs and outputs of doctest comments can be relatively long.
I think it might be useful if VSCode also highlights the contents inside the doctest comments and comments that immediately follow.

In short: currently, we have the following:

![スクリーンショット 2020-09-20 0 15 20](https://user-images.githubusercontent.com/21860/93670448-64d75380-fad6-11ea-9e38-949fa7dfb4bf.png)

And it might be good if this becomes (with a less bright colour than in the standard code block):

![スクリーンショット 2020-09-20 0 15 20-high](https://user-images.githubusercontent.com/21860/93670520-f47d0200-fad6-11ea-9563-581808644228.png)

If I understand correctly, there is a VSCode API to change text-decorations dynamically.
Or, perhaps this should be resolved upstream, i.e. might be reported to [JustusAdam/language-haskell](https://github.com/JustusAdam/language-haskell)?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。