Compare commits

..

No commits in common. "fb66ed604104d0b3235230631aecd884c9fdbc00" and "be6fc9afbe6c8bfdb9b51a921b3cdacae70480da" have entirely different histories.

64
init.el
View file

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