-
-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax highlighting in doctest comments? #1535
Comments
It seems that the upcoming LSP 3.16 specification includes semantic highlighting. So, it might be preferrable to close this issue or transfer to HLS once the situation get ready. |
this is blocked upstream on semantic highlighting support in lsp (lsp 3.16 spec was released) |
We have semantic highlighting now. However, I suspect a major problem would be figuring out what the elements in the comment actually are! |
Haddock has inline code markup, so maybe we can wrap the output in that and let LSP (or even treesitter) do the highlighting. It also should be morally correct since lawful |
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:
And it might be good if this becomes (with a less bright colour than in the standard code block):
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?
The text was updated successfully, but these errors were encountered: