jgm / jgm/skylighting

Haskell signature highlighting

Open
#12 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
218
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Currently, the syntax highlighting for Haskell only highlights the first word before `::`.

When I'm writing, I often like to provide a long list of type calculations; for instance, consider below

![image](https://user-images.githubusercontent.com/450276/28893494-81a59654-77c9-11e7-8043-52327f168948.png)

I believe that it would be better to highlight `f x` and `f . g` also; in general, I think it should highlight up to the preceding parenthesis (i.e. `id` should not be highlighted).

Another strange thing is that if the function before the double colon is `fmap`, no highlighting is applied...

![image](https://user-images.githubusercontent.com/450276/28893509-98c22a3c-77c9-11e7-9022-0bbd7bb96438.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the Haskell syntax-highlighting rules or tokenizer definitions and reproduce the examples from the issue, including signatures using `fmap`. Adjust the highlighting behavior so expressions such as `f x` and `f . g` are covered while `id` before a parenthesis is not, then verify both cases with the project's existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.