fsharp / emacs-fsharp-mode

F# Emacs mode
Apache License 2.0
206 stars 62 forks source link

Generic face for custom operators that contain pipe char sequence. #268

Closed 3Rafal closed 2 years ago

3Rafal commented 3 years ago

Currently, custom operators that contain pipe char sequence are colored partially. Let's say we have operator |>> (monadic map in FSharpPlus and FParsec libs). Part that contains pipe gets colored (|>), part that remains (>) stays default. This PR sets all custom operators with pipe sequence to default.

3Rafal commented 3 years ago

@juergenhoetzel , I've added tests for operator faces. Unfortunately, when running from buttercup they fail for |> and <| cases. Running manually

(with-highlighted "<<| |>> |> ||> |||> <| <|| <||| <|> <<|!"
  (str-face "|>"))

returns fsharp-ui-operator-face correctly though...

3Rafal commented 2 years ago

@juergenhoetzel , I have fixed tests and they're work fine now. would you mind reviewing my PR?

juergenhoetzel commented 2 years ago

Thank you for fixing this special-case and writing the tests :+1:

LSP tests fail again but is unrelated to this PR (due to fsautocomplete update) :disappointed: