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

Hasklig support for haskell layer #6703

Closed
Profpatsch opened this issue Jul 29, 2016 · 9 comments
Closed

Hasklig support for haskell layer #6703

Profpatsch opened this issue Jul 29, 2016 · 9 comments

Comments

@Profpatsch
Copy link
Contributor

Hasklig is a nice derivation of Source Code Pro that supports ligatures. Someone already found a working solution for integration in Emacs, which I integrated in my config by setting this:

  ;;;; nice glyphs for haskell
  (custom-set-variables '(haskell-font-lock-symbols t)
                        '(haskell-font-lock-symbols-alist
                          (and (fboundp 'decode-char)
                              (list (cons "&&" (decode-char 'ucs #XE100))
                                    (cons "***" (decode-char 'ucs #XE101))
                                    (cons "*>" (decode-char 'ucs #XE102))
                                    (cons "\\\\" (decode-char 'ucs #XE103))
                                    (cons "||" (decode-char 'ucs #XE104))
                                    (cons "|>" (decode-char 'ucs #XE105))
                                    (cons "::" (decode-char 'ucs #XE106))
                                    (cons "==" (decode-char 'ucs #XE107))
                                    (cons "===" (decode-char 'ucs #XE108))
                                    (cons "==>" (decode-char 'ucs #XE109))
                                    (cons "=>" (decode-char 'ucs #XE10A))
                                    (cons "=<<" (decode-char 'ucs #XE10B))
                                    (cons "!!" (decode-char 'ucs #XE10C))
                                    (cons ">>" (decode-char 'ucs #XE10D))
                                    (cons ">>=" (decode-char 'ucs #XE10E))
                                    (cons ">>>" (decode-char 'ucs #XE10F))
                                    (cons ">>-" (decode-char 'ucs #XE110))
                                    (cons ">-" (decode-char 'ucs #XE111))
                                    (cons "->" (decode-char 'ucs #XE112))
                                    (cons "-<" (decode-char 'ucs #XE113))
                                    (cons "-<<" (decode-char 'ucs #XE114))
                                    (cons "<*" (decode-char 'ucs #XE115))
                                    (cons "<*>" (decode-char 'ucs #XE116))
                                    (cons "<|" (decode-char 'ucs #XE117))
                                    (cons "<|>" (decode-char 'ucs #XE118))
                                    (cons "<$>" (decode-char 'ucs #XE119))
                                    (cons "<>" (decode-char 'ucs #XE11A))
                                    (cons "<-" (decode-char 'ucs #XE11B))
                                    (cons "<<" (decode-char 'ucs #XE11C))
                                    (cons "<<<" (decode-char 'ucs #XE11D))
                                    (cons "<+>" (decode-char 'ucs #XE11E))
                                    (cons ".." (decode-char 'ucs #XE11F))
                                    (cons "..." (decode-char 'ucs #XE120))
                                    (cons "++" (decode-char 'ucs #XE121))
                                    (cons "+++" (decode-char 'ucs #XE122))
                                    (cons "/=" (decode-char 'ucs #XE123))))))

It should be easy to provide support in Haskell mode.

@meditans
Copy link

meditans commented Oct 4, 2016

On which OS are you, @Profpatsch? Adding this to my spacemacs on Fedora displays some very weird characters, like a dotted arrow pointing right-up for the common arrow ->.

EDIT: my bad, this configuration works very well. +1 for spacemacs inclusion!

@meditans
Copy link

meditans commented Oct 8, 2016

As much as I loved this integration, it has some problems: the overlay changes the column numbering, so when querying, for example, intero for types, the types turn up to be incorrect. See for example this issue I incorrectly opened for intero.

Is there something that could be done to correct this, @Profpatsch, @TheBB?

@Profpatsch
Copy link
Contributor Author

Profpatsch commented Oct 8, 2016

No idea, I don’t use column numbering. Emacs font handling sucks, though.

@Profpatsch
Copy link
Contributor Author

Okay, with a more recent version of Hasklig the emacs integration broke horribly, but I got it working again: i-tu/Hasklig#84 (comment)

This should be general enough to make it work for multiple similar fonts (e.g. https://github.com/be5invis/Iosevka or https://github.com/tonsky/FiraCode)

@minad
Copy link

minad commented Nov 8, 2018

See https://github.com/minad/hasklig-mode. Support for Fira could be added too (#6972).

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
@Profpatsch
Copy link
Contributor Author

I’m probably not going to write the mode, but we should leave the issue open if somebody else wants to tackle it.

Companion issue for FiraCode: #6972

@duianto duianto removed the stale marked as a stale issue/pr (usually by a bot) label Mar 15, 2020
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Mar 15, 2021
@lebensterben lebensterben removed the stale marked as a stale issue/pr (usually by a bot) label Feb 4, 2022
@lebensterben
Copy link
Collaborator

lebensterben commented Feb 4, 2022

Closing since this seems to be out of our scope.

P.S. One can use https://wiki.haskell.org/Unicode-symbols for real unicode symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Forum
  
To close
Development

No branches or pull requests

7 participants