Skip to content

Font-lock misidentifying valid non-TH haskell as quasiquote #1223

Closed
@sirlensalot

Description

@sirlensalot

To reproduce issue the following code anywhere in a .hs file: [True||False]

This will incorrectly grey out from '||' through the rest of the buffer.

I came across this because of another valid non-TH case: I defined an binary op |:, use it in a list, ie [1|:2, 3|:4], same problem.

There is no workaround other than adding extraneous space, a la #1185 . This is unsatisfactory as a resolution, to demand that people avoid valid Haskell syntax to please the quasiquoter font-lock.

A suggestion is that haskell-syntactic-face-function should ensure (parse-partial-sexp ... 'syntax-table) actually finds something and doesn't just blindly font-lock all the way to (point-max).

In the absence of that, and in light of the demise of #1185, can we at least have an option to disable quasi-quote fontlock altogether? Or customize the matching regex in syntax-table: my workaround for now is to add "DISABLEQUASIQUOTE" to that string to disable the font-lock.

Thanks, Stuart

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions