fira code mode
1.0.0
這是FIRA代碼連接的簡單次要模式,它是根據Firacode Repo上的這些說明構建的。
您無需使用FIRA代碼作為emacs中的主要字體來起作用!使用此次要模式將為您提供FIRA代碼字體的連接;它不會以其他任何方式改變您的字體或面部。 (當然,您可以自由使用FIRA代碼作為您的主要字體與此軟件包一起使用 - 這就是我要做的!)
安裝fira-code-mode 。 (摘自Melpa: Mx package-install RET fira-code-mode RET )
使用Mx fira-code-mode-install-fonts RET安裝Fira Code Symbol字體
Fira Code Symbol字體與真實的Fira Code字體不同,無論系統上是否有常規的Fira Code ,都需要安裝Fira Code Symbol 。在您的配置中啟用fira-code-mode ,使用(global-fira-code-mode)或通過將fira-code-mode添加到您喜歡的掛鉤中。
完成了,享受結紮!
使用使用包裝(這是我個人使用的配置):
( use-package fira-code-mode
:custom (fira-code-mode-disabled-ligatures '( " [] " " #{ " " #( " " #_ " " #_( " " x " )) ; ; List of ligatures to turn off
:hook prog-mode) ; ; Enables fira-code-mode automatically for programming major modes可以隨意刪除或更改:custom和:hook值,但我發現這些值有用。我禁用的大多數連接純粹是優先的。其中一些與其他語法樣式相抵觸,例如Clojure讀取器宏。
如果您想將全球次要模式與使用包裝一起使用:
( use-package fira-code-mode
:config (global-fira-code-mode))無用包裝的示例配置:
( require 'fira-code-mode )
(custom-set-variable 'fira-code-mode-disabled-ligatures '( " [] " " #{ " " #( " " #_ " " #_( " " x " )) ; ; List of ligatures to turn off
; ; Enable fira-code-mode automatically for programming major modes
( add-hook 'prog-mode-hook 'fira-code-mode )
; ; Or, you can use the global mode instead of adding a hook:
(global-fira-code-mode)fira-code-mode-disabled-ligatures :在此列表中添加一個字符串,以防止該字符串用綁紮顯示。您可以將任何由fira-code-mode供電的連繩放在此處,也可以將"lambda"放在此列表中,以禁用Emacs默認的“ Lambda”結紮。但是,您不能使用此列表禁用其他軟件包提供的連接。fira-code-mode-enable-hex-literal (默認為t ):非nil時,以結紮的方式顯示“ x”(如0x12)中的“ x”。如果您看到應結紮的意外符號,那麼系統上的其他字體很可能被用來解析preatified的符號而不是FIRA代碼符號。您應該能夠通過:
Fira Code Symbol字體 - 請參閱上面的步驟2入門Fira Code Symbol ,但仍使用另一種字體來顯示連接,然後將此功能調用添加到您(fira-code-mode-set-font)配置:use-package ,這應該在您的:config中。否則,它可以在之後到任何地方(require 'fira-code-mode) 。 這是我製作的第一個Emacs包,我希望它可以使您的生活更輕鬆。我歡迎建議和貢獻,但這裡有幾件事要注意: