purescript-mode icon indicating copy to clipboard operation
purescript-mode copied to clipboard

Block comment higlighting (with a "|")

Open alenkis opened this issue 2 years ago • 1 comments

Hi!

I've noticed that comments like this

--| ...
foo x = y

fail to properly hightlight as comments, and what I see is this: Screenshot 2023-11-17 at 5 17 59 PM

I've tried to fix this on my end by adding

(add-hook 'purescript-mode-hook
          (lambda ()
            (font-lock-add-keywords nil
                                    '(("--|.*" . font-lock-comment-face)))))

But this doesn't fully solve the problem, as ocassionally keywords appear in the comment line, which somehow breaks the comment highlighting 🤷‍♂️

Is this supported? Any advice on how to fix it? Thanks!

alenkis avatar Nov 18 '23 00:11 alenkis

Is this supported? Any advice on how to fix it?

Sorry unfortunately I have no clue :D

My hope is that at some point we can switch over to tree-sitter based highlighting. If you do manage to figure it out, I'd be happy to accept a PR

kritzcreek avatar Nov 21 '23 09:11 kritzcreek