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包,我希望它可以使您的生活更轻松。我欢迎建议和贡献,但这里有几件事要注意: