diff --git a/init.el b/init.el index e3fcc8c..52947a6 100644 --- a/init.el +++ b/init.el @@ -8,7 +8,7 @@ ;;; Elpaca setup -(defvar elpaca-installer-version 0.8) +(defvar elpaca-installer-version 0.10) (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)) @@ -104,6 +104,7 @@ (setq frame-resize-pixelwise t) (setq split-height-threshold 100) (setq view-read-only t) + (setq buffer-save-without-query t) ;; Newline at end of file (setq require-final-newline t) ;; TAB cycle if there are only few candidates @@ -194,6 +195,14 @@ :ensure t :diminish visual-line-mode) +(use-package ultra-scroll + :ensure (:host github :repo "jdtsmith/ultra-scroll" :branch "main") + :init + (setq scroll-conservatively 101 ; important! + scroll-margin 0) + :config + (ultra-scroll-mode 1)) + ;;; Environment variables (use-package exec-path-from-shell @@ -358,16 +367,18 @@ ;;; Knowledge management: org-mode, org-roam, bibliography ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(setq notes-dir "~/Documents/notes") + ;; Pour accéder rapidement à l'organisation (defun gtd () "Find the planner file." (interactive) - (find-file "~/notes/planner.org")) + (find-file (file-name-concat notes-dir "planner.org"))) (defun bib () "Find the bibliography file." (interactive) - (find-file "~/notes/bibliography/bibliography.bib") + (find-file (file-name-concat notes-dir "bibliography/bibliography.bib")) (end-of-buffer)) (use-package org @@ -376,8 +387,8 @@ ("C-c a" . org-agenda) ("C-c c" . org-capture)) :config - (setq org-agenda-files (list "~/notes/planner.org")) - (setq org-default-notes-file "~/notes/planner.org") + (setq org-agenda-files (list (file-name-concat notes-dir "planner.org"))) + (setq org-default-notes-file (file-name-concat notes-dir "planner.org")) ;; List numbering with a. b. a) b), etc. (setq org-list-allow-alphabetical t) ;; Fontify code in code blocks @@ -398,7 +409,7 @@ (add-hook 'org-mode-hook #'visual-line-mode) ;; Set to the location of your Org files on your local system - (setq org-directory "~/notes") + (setq org-directory notes-dir) (setq org-agenda-block-separator ?─ org-agenda-time-grid '((daily today require-timed) @@ -437,13 +448,13 @@ (setq org-capture-templates (quote (("t" "Task" entry - (file+olp "~/notes/planner.org" "Inbox") + (file+olp (file-name-concat notes-dir "planner.org") "Inbox") "** TODO %?") ("n" "Note" entry - (file+olp "~/notes/planner.org" "Inbox") + (file+olp (file-name-concat notes-dir "planner.org") "Inbox") "** %?") ("e" "Event" entry - (file+olp "~/notes/planner.org" "Inbox") + (file+olp (file-name-concat notes-dir "planner.org") "Inbox") "** %?\n%^T")))) (setq org-log-into-drawer t) (setq org-structure-template-alist @@ -528,7 +539,7 @@ :after (org) :config (setq org-pandoc-options '((standalone . t) - (bibliography . "~/notes/bibliography/bibliography.bib")))) + (bibliography . (file-name-concat notes-dir "bibliography/bibliography.bib"))))) (use-package ox-gfm :ensure t @@ -566,8 +577,8 @@ (use-package citar :ensure t :custom - (org-cite-global-bibliography '("~/notes/bibliography/bibliography.bib")) - (org-cite-csl-styles-dir "~/notes/bibliography/") + (org-cite-global-bibliography `(,(file-name-concat notes-dir "bibliography/bibliography.bib"))) + (org-cite-csl-styles-dir (file-name-concat notes-dir "bibliography/")) (org-cite-export-processors '((beamer . (biblatex)) (latex . (biblatex)) (t . (csl "chicago-author-date.csl")))) @@ -633,7 +644,7 @@ :ensure t :after org :custom - (org-roam-directory (file-truename "~/notes/notes")) + (org-roam-directory (file-truename (file-name-concat notes-dir "notes"))) :bind (("C-c n l" . org-roam-buffer-toggle) ("C-c n f" . org-roam-node-find) ("C-c n g" . org-roam-graph) @@ -676,7 +687,7 @@ org-roam-ui-open-on-start t)) (defun dl/org-roam-rg-search () - "Search org-roam directory using consult-ripgrep. With live-preview." + "Search org-roam directory using 'consult-ripgrep'. With live-preview." (interactive) (let ((consult-ripgrep-command "rg --null --ignore-case --type org --line-buffered --color=always --max-columns=500 --no-heading --line-number . -e ARG OPTS")) (consult-ripgrep org-roam-directory))) @@ -723,7 +734,6 @@ (python-mode . python-ts-mode) (rust-mode . rust-ts-mode) (toml-mode . toml-ts-mode) - (yaml-mode . yaml-ts-mode) (css-mode . css-ts-mode) (typescript-mode . typescript-ts-mode) (js2-mode . js-ts-mode))) @@ -749,9 +759,11 @@ :bind (("C-x g" . magit-status) ("C-x M-g" . magit-dispatch))) -(use-package forge +(use-package git-link :ensure t - :after magit) + :after transient + :config + (require 'git-link-transient)) (use-package eglot :ensure nil @@ -812,8 +824,10 @@ (use-package rust-mode :ensure t) -(use-package pyvenv - :ensure t) +(use-package pet + :ensure t + :config + (add-hook 'python-base-mode-hook 'pet-mode -10)) (use-package paredit :ensure t @@ -888,13 +902,6 @@ :config (dirvish-override-dired-mode)) -(use-package restclient - :ensure t) - -(use-package ob-restclient - :ensure t - :after (org)) - (use-package pdf-tools :ensure t :load-path "site-lisp/pdf-tools/lisp" @@ -986,6 +993,7 @@ (eat-update-semi-char-mode-map) (eat-reload) ;; Appearance + (setq eat-term-scrollback-size nil) (setq eat-enable-shell-prompt-annotation nil) (setopt eat-very-visible-cursor-type '(t nil nil)) (setopt eat-default-cursor-type '(t nil nil)) @@ -1009,6 +1017,8 @@ (lambda () (when (file-exists-p custom-file) (load custom-file 'noerror)))) -(message "Successfully loaded entire config!") +(use-package gptel + :ensure t) +(message "Successfully loaded entire config!") ;;; init.el ends here