Browse Source

Emacs: Improve buffer group separation for projects

master
Riyyi 1 week ago
parent
commit
9d7b1f5850
  1. 10
      .config/emacs/site-lisp/dot-development.el
  2. 6
      .config/emacs/site-lisp/dot-elpaca.el
  3. 1
      .config/emacs/site-lisp/dot-keybinds.el
  4. 1
      .config/emacs/site-lisp/dot-org-mode.el

10
.config/emacs/site-lisp/dot-development.el

@ -144,7 +144,11 @@
"Return project name." "Return project name."
(let ((project (project-current))) (let ((project (project-current)))
(if project (if project
(file-name-nondirectory (directory-file-name (project-root project))) (let* ((project (file-truename (directory-file-name (project-root (project-current)))))
(parent-dir-full (file-name-directory (directory-file-name project)))
(parent-dir (file-name-nondirectory (substring parent-dir-full 0 -1)))
(filename (file-name-nondirectory project)))
(concat filename "/" parent-dir))
"-"))) "-")))
(defun dot/project-save-project-buffers () (defun dot/project-save-project-buffers ()
@ -350,7 +354,9 @@
;;; HTML ;;; HTML
(elpaca-setup web-mode) (elpaca-setup web-mode
(:file-match "\\.ts")
(:file-match "\\.vue"))
;;; Kotlin ;;; Kotlin

6
.config/emacs/site-lisp/dot-elpaca.el

@ -9,7 +9,7 @@
;; ----------------------------------------- ;; -----------------------------------------
;; Elpaca bootstrap ;; Elpaca bootstrap
(defvar elpaca-installer-version 0.7) (defvar elpaca-installer-version 0.8)
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory)) (defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory)) (defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory)) (defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
@ -26,9 +26,9 @@
(make-directory repo t) (make-directory repo t)
(when (< emacs-major-version 28) (require 'subr-x)) (when (< emacs-major-version 28) (require 'subr-x))
(condition-case-unless-debug err (condition-case-unless-debug err
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*")) (if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
((zerop (apply #'call-process `("git" nil ,buffer t "clone" ((zerop (apply #'call-process `("git" nil ,buffer t "clone"
,@(when-let ((depth (plist-get order :depth))) ,@(when-let* ((depth (plist-get order :depth)))
(list (format "--depth=%d" depth) "--no-single-branch")) (list (format "--depth=%d" depth) "--no-single-branch"))
,(plist-get order :repo) ,repo)))) ,(plist-get order :repo) ,repo))))
((zerop (call-process "git" nil buffer t "checkout" ((zerop (call-process "git" nil buffer t "checkout"

1
.config/emacs/site-lisp/dot-keybinds.el

@ -41,6 +41,7 @@
"M-j" nil "M-j" nil
"M-k" nil "M-k" nil
"M-l" nil "M-l" nil
"<pinch>" nil ; Do not scale text when pinching touchpad
))) )))
(elpaca-nil (setup org (elpaca-nil (setup org

1
.config/emacs/site-lisp/dot-org-mode.el

@ -190,6 +190,7 @@ When ANYWHERE is non-nil, search beyond the preamble."
(elpaca-nil (setup ox-latex ; built-in (elpaca-nil (setup ox-latex ; built-in
(:when-loaded (:when-loaded
;; Define how minted (highlighted src code) is added to src code blocks ;; Define how minted (highlighted src code) is added to src code blocks
;; Requires packages: texlive-bin, texlive-latexextra and python-pygments
(setq org-latex-listings 'minted) (setq org-latex-listings 'minted)
(setq org-latex-minted-options '(("frame" "lines") ("linenos=true"))) (setq org-latex-minted-options '(("frame" "lines") ("linenos=true")))
;; Set 'Table of Contents' layout ;; Set 'Table of Contents' layout

Loading…
Cancel
Save