Fix Ligature Issue & Add Makefile to Org babel Languages

- Replace ligature package submodule with fira code mode
- Add makefile to org babel languages
This commit is contained in:
Sravan Balaji 2021-06-07 08:35:25 -04:00
parent e24d5057db
commit b99cb3ceca
4 changed files with 14 additions and 68 deletions

4
.gitmodules vendored
View File

@ -1,4 +0,0 @@
[submodule "packages/ligature.el"]
path = packages/ligature.el
url = git@github.com:mickeynp/ligature.el.git
branch = master

View File

@ -111,33 +111,16 @@ Setup FiraCode and Cantarell fonts with specified size.
** Ligature Support
Add ligature support for Fira Code font.
Add ligature support using Fira Code symbols.
- https://github.com/tonsky/FiraCode/wiki/Emacs-instructions#using-ligatureel
*NOTE*: The first time you load your configuration on a new machine, you'll need to run the following command interactively so that ligature symbols display correctly:
~M-x fira-code-mode-install-fonts RET~
#+begin_src emacs-lisp :tangle init.el
(use-package ligature
:load-path "./packages/ligature.el"
:config
;; Enable the "www" ligature in every possible major mode
(ligature-set-ligatures 't '("www"))
;; Enable traditional ligature support in eww-mode, if the
;; `variable-pitch' face supports it
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
;; Enable ligatures in programming modes (Fira Code)
(ligature-set-ligatures 'prog-mode '("www" "**" "***" "**/" "*>" "*/" "\\\\" "\\\\\\" "{-" "::"
":::" ":=" "!!" "!=" "!==" "-}" "----" "-->" "->" "->>"
"-<" "-<<" "-~" "#{" "#[" "##" "###" "####" "#(" "#?" "#_"
"#_(" ".-" ".=" ".." "..<" "..." "?=" "??" ";;" "/*" "/**"
"/=" "/==" "/>" "//" "///" "&&" "||" "||=" "|=" "|>" "^=" "$>"
"++" "+++" "+>" "=:=" "==" "===" "==>" "=>" "=>>" "<="
"=<<" "=/=" ">-" ">=" ">=>" ">>" ">>-" ">>=" ">>>" "<*"
"<*>" "<|" "<|>" "<$" "<$>" "<!--" "<-" "<--" "<->" "<+"
"<+>" "<=" "<==" "<=>" "<=<" "<>" "<<" "<<-" "<<=" "<<<"
"<~" "<~~" "</" "</>" "~@" "~-" "~>" "~~" "~~>" "%%"))
;; Enables ligature checks globally in all buffers. You can also do it
;; per mode with `ligature-mode'.
(global-ligature-mode t))
(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
#+end_src
* Keybindings
@ -221,11 +204,9 @@ Add ligature support for Fira Code font.
#+end_src
** Better Modeline
*NOTE*: The first time you load your configuration on a new machine, you'll
need to run the following command interactively so that mode line icons
display correctly:
*NOTE*: The first time you load your configuration on a new machine, you'll need to run the following command interactively so that mode line icons display correctly:
~M-x all-the-icons-install-fonts~
~M-x all-the-icons-install-fonts RET~
#+begin_src emacs-lisp :tangle init.el
;; Icon Fonts
@ -541,6 +522,7 @@ Use Hydra to design a transient key binding for quickly adjusting the scale of t
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(makefile . t)
(python . t)))
(push '("conf-unix" . conf-unix) org-src-lang-modes)

39
init.el
View File

@ -60,28 +60,9 @@
;; Set the variable pitch font
(set-face-attribute 'variable-pitch nil :font sb/document-font :height sb/default-font-size :weight 'regular)
(use-package ligature
:load-path "./packages/ligature.el"
:config
;; Enable the "www" ligature in every possible major mode
(ligature-set-ligatures 't '("www"))
;; Enable traditional ligature support in eww-mode, if the
;; `variable-pitch' face supports it
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
;; Enable ligatures in programming modes (Fira Code)
(ligature-set-ligatures 'prog-mode '("www" "**" "***" "**/" "*>" "*/" "\\\\" "\\\\\\" "{-" "::"
":::" ":=" "!!" "!=" "!==" "-}" "----" "-->" "->" "->>"
"-<" "-<<" "-~" "#{" "#[" "##" "###" "####" "#(" "#?" "#_"
"#_(" ".-" ".=" ".." "..<" "..." "?=" "??" ";;" "/*" "/**"
"/=" "/==" "/>" "//" "///" "&&" "||" "||=" "|=" "|>" "^=" "$>"
"++" "+++" "+>" "=:=" "==" "===" "==>" "=>" "=>>" "<="
"=<<" "=/=" ">-" ">=" ">=>" ">>" ">>-" ">>=" ">>>" "<*"
"<*>" "<|" "<|>" "<$" "<$>" "<!--" "<-" "<--" "<->" "<+"
"<+>" "<=" "<==" "<=>" "<=<" "<>" "<<" "<<-" "<<=" "<<<"
"<~" "<~~" "</" "</>" "~@" "~-" "~>" "~~" "~~>" "%%"))
;; Enables ligature checks globally in all buffers. You can also do it
;; per mode with `ligature-mode'.
(global-ligature-mode t))
(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
;; Make ESC quit prompts
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
@ -407,6 +388,7 @@
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(makefile . t)
(python . t)))
(push '("conf-unix" . conf-unix) org-src-lang-modes)
@ -502,16 +484,3 @@
;; Rainbow Delimiters
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
'(doom-themes which-key vimrc-mode use-package rainbow-delimiters org-bullets org-auto-tangle magit lsp-ui lsp-treemacs lsp-ivy ivy-rich highlight-indent-guides helpful haskell-mode gitignore-mode gitconfig-mode gitattributes-mode general fish-mode evil-nerd-commenter evil-easymotion evil-collection doom-modeline counsel-projectile company-box auto-package-update)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

@ -1 +0,0 @@
Subproject commit 3923baf1fb9bf509cc95b4b14d7d0e2f7c88e53c