[WIP] Fixes new server/client model

This commit is contained in:
Andrea Ciceri 2023-02-16 22:44:20 +01:00
parent 7646038b6f
commit 65f4b29304
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
2 changed files with 24 additions and 6 deletions

28
init.el
View file

@ -19,13 +19,29 @@
(dolist (feature (nreverse features)) (dolist (feature (nreverse features))
(setq body `(with-eval-after-load ',feature ,body))) (setq body `(with-eval-after-load ',feature ,body)))
body)) body))
:documentation "Load the cvurrent feature after FEATURES.") :documentation "Load the current feature after FEATURES.")
(setup ligatures
(ligature-set-ligatures 't '("www"))
(ligature-set-ligatures 'prog-mode '("www" "**" "***" "**/" "*>" "*/" "\\\\" "\\\\\\" "{-" "::"
":::" ":=" "!!" "!=" "!==" "-}" "----" "-->" "->" "->>"
"-<" "-<<" "-~" "#{" "#[" "##" "###" "####" "#(" "#?" "#_"
"#_(" ".-" ".=" ".." "..<" "..." "?=" "??" ";;" "/*" "/**"
"/=" "/==" "/>" "//" "///" "&&" "||" "||=" "|=" "|>" "^=" "$>"
"++" "+++" "+>" "=:=" "==" "===" "==>" "=>" "=>>" "<="
"=<<" "=/=" ">-" ">=" ">=>" ">>" ">>-" ">>=" ">>>" "<*"
"<*>" "<|" "<|>" "<$" "<$>" "<!--" "<-" "<--" "<->" "<+"
"<+>" "<=" "<==" "<=>" "<=<" "<>" "<<" "<<-" "<<=" "<<<"
"<~" "<~~" "</" "</>" "~@" "~-" "~>" "~~" "~~>" "%%"))
(global-ligature-mode 't)
)
(setup fira-code-mode (when (display-graphic-p) (global-fira-code-mode)))
(setup flycheck (setup flycheck
(:require flycheck) (:require flycheck)
(:hook-into prog-mode) (:hook-into prog-mode)
;; FIXME the following requires the same fix as `fira-code-mode`
(if (display-graphic-p) (:hook flycheck-posframe-mode) (:hook flycheck-inline-mode))) (if (display-graphic-p) (:hook flycheck-posframe-mode) (:hook flycheck-inline-mode)))
(setup eglot (setup eglot
@ -43,8 +59,10 @@
backup-directory-alist `(("." . ,temporary-file-directory)) backup-directory-alist `(("." . ,temporary-file-directory))
auto-save-files-name-transforms `((".*" ,temporary-file-directory t)) auto-save-files-name-transforms `((".*" ,temporary-file-directory t))
backup-by-copying t) backup-by-copying t)
(defun ccr/set-faces () (set-face-attribute 'default nil :font "Fira Code 12"))
(set-face-attribute 'default nil :font "Fira Code 12") (if (daemonp)
(add-hook 'server-after-make-frame-hook #'ccr/set-faces)
(ccr/set-faces))
(menu-bar-mode -1) (menu-bar-mode -1)
(scroll-bar-mode -1) (scroll-bar-mode -1)
(tool-bar-mode -1) (tool-bar-mode -1)
@ -52,7 +70,7 @@
(global-auto-revert-mode t) (global-auto-revert-mode t)
(show-paren-mode 1) (show-paren-mode 1)
(column-number-mode 1) (column-number-mode 1)
(unless (display-graphic-p) (unless (display-graphic-p) ;; FIXME make it work when starting Emacs as daemon
(advice-add 'enable-theme (advice-add 'enable-theme
:after :after
#'(lambda (&rest rest) #'(lambda (&rest rest)

View file

@ -11,7 +11,6 @@ with epkgs; [
orderless orderless
embark embark
embark-consult embark-consult
fira-code-mode
vterm vterm
setup setup
magit magit
@ -43,4 +42,5 @@ with epkgs; [
dirvish dirvish
diredfl diredfl
pdf-tools pdf-tools
ligature
] ]