ligatures and line numbers

This commit is contained in:
Mars 2024-08-12 03:34:08 -04:00
parent dbbb08523b
commit 468bac3270
Signed by: pupbrained
GPG key ID: 874E22DF2F9DFCB5

View file

@ -87,6 +87,7 @@
evil-leader evil-leader
flycheck flycheck
flycheck-inline flycheck-inline
ligature
lua-mode lua-mode
ns-auto-titlebar ns-auto-titlebar
nix-mode nix-mode
@ -112,6 +113,10 @@
; Set font ; Set font
(set-frame-font "Maple Mono NF 16" nil t) (set-frame-font "Maple Mono NF 16" nil t)
; Show line numbers
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(setq display-line-numbers-type 'relative)
; Change default indent size to 2 spaces ; Change default indent size to 2 spaces
(setq-default indent-tabs-mode nil) ;; Use spaces instead of tabs (setq-default indent-tabs-mode nil) ;; Use spaces instead of tabs
(setq-default standard-indent 2) ;; Change indent (setq-default standard-indent 2) ;; Change indent
@ -233,6 +238,26 @@
(treemacs-select-window))) (treemacs-select-window)))
(global-set-key (kbd "C-c C-c") 'my/compile-and-focus-treemacs) (global-set-key (kbd "C-c C-c") 'my/compile-and-focus-treemacs)
; Ligatures
(setq maple-ligatures
'(;; coding ligatures
"<!---" "--->" "|||>" "<!--" "<|||" "<==>" "-->" "->>" "-<<" "..=" "!=="
"#_(" "/==" "||>" "||=" "|->" "===" "==>" "=>>" "=<<" "=/=" ">->" ">=>"
">>-" ">>=" "<--" "<->" "<-<" "<||" "<|>" "<=" "<==" "<=>" "<=<" "<<-"
"<<=" "<~>" "<~~" "~~>" ">&-" "<&-" "&>>" "&>" "->" "-<" "-~" ".=" "!="
"#_" "/=" "|=" "|>" "==" "=>" ">-" ">=" "<-" "<|" "<~" "~-" "~@" "~="
"~>" "~~"
;; whitespace ligatures
"---" "..." "{|" "[|" ".?" "::" ":::" "::=" ":="
":>" ":<" "\;\;" "!!" "!!." "!!!" "?." "?:" "??" "?=" "**" "***" "*>"
"*/" "--" "#:" "#!" "#?" "##" "###" "####" "#=" "/*" "/>" "//" "/**"
"///" "$(" ">&" "<&" "&&" "|}" "|]" "$>" ".." "++" "+++" "+>" "=:="
"=!=" ">:" ">>" ">>>" "<:" "<*" "<*>" "<$" "<$>" "<+" "<+>" "<>" "<<"
"<<<" "</" "</>" "^=" "%%"))
(ligature-set-ligatures 'prog-mode maple-ligatures)
(global-ligature-mode t)
''; '';
}; };