Ligature & Haskell Language Support
- Add gitignore for local files that shouldn't be tracked - Add ligature.el as a submodule to enable ligature support for Fira Code - Add haskell org template & language mode
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
auto-save-list/*
|
||||
elpa/*
|
||||
projectile-bookmarks.eld
|
||||
transient/*
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "packages/ligature.el"]
|
||||
path = packages/ligature.el
|
||||
url = git@github.com:mickeynp/ligature.el.git
|
39
README.org
39
README.org
@@ -97,6 +97,36 @@ Setup FiraCode and Cantarell fonts with specified size.
|
||||
(set-face-attribute 'variable-pitch nil :font "Cantarell" :height sb/default-font-size :weight 'regular)
|
||||
#+end_src
|
||||
|
||||
** Ligature Support
|
||||
|
||||
Add ligature support for Fira Code font.
|
||||
- https://github.com/tonsky/FiraCode/wiki/Emacs-instructions#using-ligatureel
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(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))
|
||||
#+end_src
|
||||
|
||||
* Keybindings
|
||||
|
||||
** General
|
||||
@@ -478,6 +508,7 @@ Use Hydra to design a transient key binding for quickly adjusting the scale of t
|
||||
(add-to-list 'org-structure-template-alist '("sh" . "src shell"))
|
||||
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
|
||||
(add-to-list 'org-structure-template-alist '("py" . "src python"))
|
||||
(add-to-list 'org-structure-template-alist '("hs" . "src haskell"))
|
||||
#+end_src
|
||||
|
||||
** Auto-Tangle Configuration Files
|
||||
@@ -507,6 +538,14 @@ Automatically tangle code blocks in file everytime it is saved.
|
||||
|
||||
** Languages
|
||||
|
||||
*** Language Modes
|
||||
|
||||
**** Haskell
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package haskell-mode)
|
||||
#+end_src
|
||||
|
||||
*** Language Servers
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
26
init.el
26
init.el
@@ -50,6 +50,29 @@
|
||||
;; Set the variable pitch face
|
||||
(set-face-attribute 'variable-pitch nil :font "Cantarell" :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))
|
||||
|
||||
;; Make ESC quit prompts
|
||||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||
|
||||
@@ -363,6 +386,7 @@
|
||||
(add-to-list 'org-structure-template-alist '("sh" . "src shell"))
|
||||
(add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
|
||||
(add-to-list 'org-structure-template-alist '("py" . "src python"))
|
||||
(add-to-list 'org-structure-template-alist '("hs" . "src haskell"))
|
||||
|
||||
;; Automatically tangle our Emacs.org config file when we save it
|
||||
(defun sb/org-babel-tangle-config ()
|
||||
@@ -377,6 +401,8 @@
|
||||
(use-package evil-nerd-commenter
|
||||
:bind ("M-/" . evilnc-comment-or-uncomment-lines))
|
||||
|
||||
(use-package haskell-mode)
|
||||
|
||||
(defun sb/lsp-mode-setup ()
|
||||
(setq lsp-headerline-breadcrumb-segments '(path-up-to-project file symbols))
|
||||
(lsp-headerline-breadcrumb-mode))
|
||||
|
1
packages/ligature.el
Submodule
1
packages/ligature.el
Submodule
Submodule packages/ligature.el added at 5d758491ee
Reference in New Issue
Block a user