Skip to content
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

Type Signatures on New Line #104

Open
ruhatch opened this issue Apr 18, 2017 · 3 comments
Open

Type Signatures on New Line #104

ruhatch opened this issue Apr 18, 2017 · 3 comments

Comments

@ruhatch
Copy link

ruhatch commented Apr 18, 2017

I have some type signatures laid out as

function
  :: Type1
  -> Type2
function = undefined

and the highlighting here seems to be incorrect. The function name is not highlighted as usual, and the third line (-> Type2) is not coloured correctly.

@lierdakil
Copy link
Contributor

Atom's grammar model limitation. See #57, #81, #89, #101, and probably a few others. I will keep this open to increase visibility, since these reports get extremely redundant after a while.

@lierdakil
Copy link
Contributor

Relevant: lspitzner/brittany#94

@lierdakil
Copy link
Contributor

Actually, I managed to come up with a reasonably effective band-aid (finally?). Not a solution, not by any stretch, but should help with the most common case.

It basically works by asserting that Haskell statements can't start with :: operator, hence successive lines having the same indentation level as :: have to be part of a signature.

So this works (somewhat, identifier isn't highlighted as a signature declaration):
image

this still doesn't, but such formatting is rather rare, I reckon:
image

Best results are still achieved with something like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants