]> git.eshelyaron.com Git - dotfiles.git/commitdiff
Update Emacs config main
authorEshel Yaron <me@eshelyaron.com>
Mon, 25 Nov 2024 08:47:09 +0000 (09:47 +0100)
committerEshel Yaron <me@eshelyaron.com>
Mon, 25 Nov 2024 08:47:09 +0000 (09:47 +0100)
.emacs.d/init.el
.emacs.d/theme/esy-theme.el

index 59128f7aaac4a63e2dcf8c0d4fd5484eb4392013..092fa3f62595894425a694847da6cc71523c518c 100644 (file)
@@ -23,7 +23,9 @@
 (pcase system-type
   ('darwin
    (add-to-list 'exec-path "/usr/local/bin")
-   (setq initial-frame-alist '((fullscreen . fullboth))
+   (setq initial-frame-alist '((fullscreen . fullboth)
+                               ;; (minibuffer)
+                               )
          frame-title-format "Emacs")
    (set-fontset-font t '(?􀀀 . ?􏿽) "SF Pro Display"))
   ('android
@@ -65,7 +67,7 @@
 
 ;;; Set up Elpaca
 
-(defvar elpaca-installer-version 0.7)
+(defvar elpaca-installer-version 0.8)
 (defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
 (defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
 (defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
   (unless (file-exists-p repo)
     (make-directory repo t)
     (condition-case-unless-debug err
-        (if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
-                 ((zerop (call-process "git" nil buffer t "clone"
-                                       (plist-get order :repo) repo)))
-                 ((zerop (call-process "git" nil buffer t "checkout"
-                                       (or (plist-get order :ref) "--"))))
-                 (emacs (concat invocation-directory invocation-name))
-                 ((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
-                                       "--eval" "(byte-recompile-directory \".\" 0 'force)")))
-                 ((require 'elpaca))
-                 ((elpaca-generate-autoloads "elpaca" repo)))
+        (if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
+                  ((zerop (call-process "git" nil buffer t "clone"
+                                        (plist-get order :repo) repo)))
+                  ((zerop (call-process "git" nil buffer t "checkout"
+                                        (or (plist-get order :ref) "--"))))
+                  (emacs (concat invocation-directory invocation-name))
+                  ((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
+                                        "--eval" "(byte-recompile-directory \".\" 0 'force)")))
+                  ((require 'elpaca))
+                  ((elpaca-generate-autoloads "elpaca" repo)))
             (progn (message "%s" (buffer-string)) (kill-buffer buffer))
           (error "%s" (with-current-buffer buffer (buffer-string))))
       ((error) (warn "%s" err) (delete-directory repo 'recursive))))
 ;;          :local-repo "oauth2"
 ;;          :branch "externals/oauth2"))
 (elpaca transient)
-(elpaca magit)
+(elpaca (magit :repo "git@git.sr.ht:~eshel/magit"))
 (elpaca (markdown-mode
          :pre-build (("pandoc" "-o" "markdown-mode.texi" "README.md"))))
 (elpaca mastodon)
 (elpaca paredit)
 (elpaca sqlformat)
 (elpaca (auctex
+         :repo "git@git.sr.ht:~eshel/auctex"
          :branch "main"
          :files ("*.el" "*.info*")
          :pre-build (("./autogen.sh")
                      ("./configure" "--with-lispdir=." "--with-texmf-dir=/tmp")
                      ("make")
                      ("cp" "doc/auctex.info" "doc/auctex.info-1" "doc/auctex.info-2" "doc/preview-latex.info" "."))))
+(elpaca (tablist :repo "git@git.sr.ht:~eshel/tablist"))
 (elpaca (pdf-tools
+         :repo "git@git.sr.ht:~eshel/pdf-tools"
          :pre-build (("emacs" "--batch" "-l" "ox-texinfo" "README.org"
                       "--eval" "(setq org-babel-confirm-evaluate-answer-no t)"
                       "--eval" "(setq org-export-with-broken-links t)"
@@ -434,7 +439,7 @@ DEADLINE: %(format-time-string \"<%Y-%m-%d %H:%M>\" (org-read-date t t))
  read-minibuffer-restore-windows nil
  ;; include CWD in shell command prompts
  shell-command-prompt-show-cwd t
- shell-kill-buffer-on-exit t
;; shell-kill-buffer-on-exit t
  shell-dirtrack-verbose nil
  compilation-scroll-output t
  display-time-default-load-average nil
@@ -487,7 +492,10 @@ DEADLINE: %(format-time-string \"<%Y-%m-%d %H:%M>\" (org-read-date t t))
  imenu-auto-rescan t)
 
 (setq-default indent-tabs-mode nil
-               display-line-numbers-width 4)
+              display-line-numbers-width 4)
+
+(setq-default eglot-workspace-configuration
+              '(:yaml (:schemas (:kubernetes "*"))))
 
 ;;; Load my custom theme
 
@@ -890,7 +898,7 @@ Interactively, POINT is point and KILL is the prefix argument."
 
   (defvar esy/projects-directory "~/checkouts/")
 
-  (defun esy/read-project-by-name ()
+  (defun esy/read-project-by-name (&optional _)
     "Read a project name and return its root directory.
 
 If no known project matches the selected name, prompt for a
@@ -1274,7 +1282,7 @@ as the initial input for completion, and return that directory."
   (keymap-set completion-preview-active-mode-map "M-f" #'completion-preview-insert-word))
 
 (add-hook 'eval-expression-minibuffer-setup-hook #'completion-preview-mode)
-(add-hook 'eval-expression-minibuffer-setup-hook #'electric-pair-mode)
+(add-hook 'eval-expression-minibuffer-setup-hook #'electric-pair-local-mode)
 
 (load-file "/usr/local/opt/agda/libexec/ghc-9.10.1-inplace/Agd-2.6.4.3-7d670049/share/emacs-mode/agda2.el")
 
@@ -1387,5 +1395,7 @@ as the initial input for completion, and return that directory."
 
 (add-hook 'find-function-after-hook #'esy/pulse-line)
 
+(with-eval-after-load 'package (backtrace))
+
 (provide 'init)
 ;;; init.el ends here
index 252a7d5a0baa918ea65a2f3d2897beef762ab725..50b67a2499ca5ee4d34fe7e907ec6333e74a1c44 100644 (file)
@@ -59,7 +59,7 @@
      mode-name mode-line-process minor-mode-alist
      (:eval (when (window-dedicated-p)
               " Dedicated"))
-     (eglot--managed-mode (" " (:eval (when (eglot--mode-line-format)))))
+     (eglot--managed-mode (" " (:eval (eglot--mode-line-format))))
      "%n%])"
      (vc-mode vc-mode)
      (which-func-mode (" " which-func-format))