jming422/fira-code-mode

Showing different icons instead of ligatures

robinsrk opened this issue · 8 comments

When turning on fira code mode, it is showing random icons instead of showing ligatures. attaching some screenshot with and without fira code mode.

with fira code mode
image

without fira code mode
image

Looks like a font other than Fira Code Symbol is being used to display the ligature glyphs.

If you haven't already, install the Fira Code Symbol font to your system with M-x fira-code-mode-install-fonts RET.

If you've already done that or if doing so doesn't fix the issue, you can try M-x fira-code-mode--setup RET. If that solves your problem, then add it to your config and you should be good to go.

If not, I'm not sure exactly how to solve the issue, but putting your point over one of the symbols and typing M-x describe-char to get more info would be a good place to start.

Looks like a font other than Fira Code Symbol is being used to display the ligature glyphs.

If you haven't already, install the Fira Code Symbol font to your system with M-x fira-code-mode-install-fonts RET.

If you've already done that or if doing so doesn't fix the issue, you can try M-x fira-code-mode--setup RET. If that solves your problem, then add it to your config and you should be good to go.

If not, I'm not sure exactly how to solve the issue, but putting your point over one of the symbols and typing M-x describe-char to get more info would be a good place to start.

I have checked it with fira code font also, same problem, and tried fira-code-mode-install-fonts. but no luck. And there is no option for 'fira-code-mode--setup', can't run that.
ok i will try to see with 'describe-char' to find any issue

Looks like a font other than Fira Code Symbol is being used to display the ligature glyphs.

If you haven't already, install the Fira Code Symbol font to your system with M-x fira-code-mode-install-fonts RET.

If you've already done that or if doing so doesn't fix the issue, you can try M-x fira-code-mode--setup RET. If that solves your problem, then add it to your config and you should be good to go.

If not, I'm not sure exactly how to solve the issue, but putting your point over one of the symbols and typing M-x describe-char to get more info would be a good place to start.

This is the output of describe-char

` position: 277 of 756 (37%), column: 21
character: : (displayed as :) (codepoint 58, #o72, #x3a)
charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x3A
script: latin
syntax: . which means: punctuation
category: .:Base, a:ASCII, l:Latin, r:Roman
to input: type "C-x 8 RET 3a" or "C-x 8 RET COLON"
buffer code: #x3A
file code: #x3A (encoded by coding system undecided-unix)
display: by this font (glyph code)
ftcrhb:-H&Co-Operator Mono-light-normal-normal--17----m-0-iso10646-1 (#x1D)

Character code properties: customize what to show
name: COLON
general-category: Po (Punctuation, Other)
decomposition: (58) (':')

There is an overlay here:
From 254 to 279
face hl-line
priority -50
window nil

There are text properties here:
fontified t
prettify-symbols-end 278
prettify-symbols-start 277
`

And there is no option for 'fira-code-mode--setup', can't run that.

Sorry about that, I forgot that function isn't available via M-x. If you've already got the package loaded, you can run it with M-: (fira-code-mode--setup) RET. If it works for you I'll probably release an update which autoloads that function.

And there is no option for 'fira-code-mode--setup', can't run that.

Sorry about that, I forgot that function isn't available via M-x. If you've already got the package loaded, you can run it with M-: (fira-code-mode--setup) RET. If it works for you I'll probably release an update which autoloads that function.

Tried with M-: fira-code-mode--setup but no luck, it shows an error. Am i missing something?
image

With M-: you're entering elisp, so the parentheses are required - M-: fira-code-mode--setup RET won't work, but M-: (fira-code-mode--setup) RET should so long as fira-code-mode.el has already been loaded

With M-: you're entering elisp, so the parentheses are required - M-: fira-code-mode--setup RET won't work, but M-: (fira-code-mode--setup) RET should so long as fira-code-mode.el has already been loaded

Yea thanks it worked. but as soon as i restart emacs, it again shows those symbols. so please push an update fixing thins bug

Yea thanks it worked.

Hurray, I'm glad!

but as soon as i restart emacs, it again shows those symbols.

Like I mentioned above:

If that solves your problem, then add it to your config and you should be good to go.

You need to add (fira-code-mode--setup) to your configuration after fira-code-mode has been loaded. If you use use-package, then this would go in your :config block.

so please push an update fixing thins bug

I will most likely push an update which documents this situation in the README and autoloads the setup function so it can be run with M-x, but this is only an issue in relatively rare cases where your system has a font which clashes on the area of Unicode space used by Fira Code Symbol. On my system and many others', this step is not necessary, and in fact causes some conflicts with other packages such as all-the-icons. So I won't enable calling this function by default, but I will make it easier and more obvious that people with certain fonts installed to their system need to add this to their config.