diff options
author | Matthew Kosarek <matthew@matthewkosarek.xyz> | 2024-01-01 15:55:56 -0500 |
---|---|---|
committer | Matthew Kosarek <matthew@matthewkosarek.xyz> | 2024-01-01 15:55:56 -0500 |
commit | 0b2c26b0e1fb7aaafcd2bf656b739d9b7223bc65 (patch) | |
tree | 4def5d6e13abca5557c4ff433da8581d3cff4422 /lisp/general.el | |
parent | 12668c7677e70abf2f9e336f5c2e35d253faa671 (diff) |
oodles of improvements, I don't even know anymore!
Diffstat (limited to 'lisp/general.el')
-rw-r--r-- | lisp/general.el | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/lisp/general.el b/lisp/general.el index 9b3f6c9..4b51b9b 100644 --- a/lisp/general.el +++ b/lisp/general.el @@ -32,6 +32,33 @@ :weight 'normal :width 'normal) +; Taken from: https://emacs.stackexchange.com/questions/55059/ligatures-with-the-jetbrains-mono-font +(defconst jetbrains-ligature-mode--ligatures + '("-->" "//" "/**" "/*" "*/" "<!--" ":=" "->>" "<<-" "->" "<-" + "<=>" "==" "!=" "<=" ">=" "=:=" "!==" "&&" "||" "..." ".." + "|||" "///" "&&&" "===" "++" "--" "=>" "|>" "<|" "||>" "<||" + "|||>" "<|||" ">>" "<<" "::=" "|]" "[|" "{|" "|}" + "[<" ">]" ":?>" ":?" "/=" "[||]" "!!" "?:" "?." "::" + "+++" "??" "###" "##" ":::" "####" ".?" "?=" "=!=" "<|>" + "<:" ":<" ":>" ">:" "<>" "***" ";;" "/==" ".=" ".-" "__" + "=/=" "<-<" "<<<" ">>>" "<=<" "<<=" "<==" "<==>" "==>" "=>>" + ">=>" ">>=" ">>-" ">-" "<~>" "-<" "-<<" "=<<" "---" "<-|" + "<=|" "/\\" "\\/" "|=>" "|~>" "<~~" "<~" "~~" "~~>" "~>" + "<$>" "<$" "$>" "<+>" "<+" "+>" "<*>" "<*" "*>" "</>" "</" "/>" + "<->" "..<" "~=" "~-" "-~" "~@" "^=" "-|" "_|_" "|-" "||-" + "|=" "||=" "#{" "#[" "]#" "#(" "#?" "#_" "#_(" "#:" "#!" "#=" + "&=")) + +(sort jetbrains-ligature-mode--ligatures (lambda (x y) (> (length x) (length y)))) + +(dolist (pat jetbrains-ligature-mode--ligatures) + (set-char-table-range composition-function-table + (aref pat 0) + (nconc (char-table-range composition-function-table (aref pat 0)) + (list (vector (regexp-quote pat) + 0 + 'compose-gstring-for-graphic))))) + ;; Don't ask to kill when we have an open line number (setq-default confirm-kill-processes nil) @@ -86,6 +113,22 @@ (setq-default left-fringe-width 20) (setq-default right-fringe-width 20) +;; Margins: https://stackoverflow.com/a/22320638/7980887 +(defun my-set-text-margins () + "Set margins in current buffer." + (setq left-margin-width 50) + (setq right-margin-width 50)) + +(add-hook 'text-mode-hook 'my-set-text-margins) + +(defun my-set-prog-margins () + "Set margins in current buffer." + (setq left-margin-width 25) + (setq right-margin-width 25)) + +(add-hook 'prog-mode-hook 'my-set-prog-margins) + + ;; Highlight todos (use-package hl-todo :ensure t @@ -248,7 +291,8 @@ :bind ("<f2>" . #'eglot-rename) :config (add-to-list 'eglot-server-programs '((c++-mode c-mode) "clangd")) - (add-hook 'c-mode-common-hook 'eglot-ensure)) + (add-hook 'c-mode-common-hook 'eglot-ensure) + (add-hook 'dart-mode-hook 'eglot-ensure)) (set-face-underline 'eglot-highlight-symbol-face t) |