Compare commits
10 commits
be6fc9afbe
...
fb66ed6041
Author | SHA1 | Date | |
---|---|---|---|
fb66ed6041 | |||
b157c82f93 | |||
f62be5ee59 | |||
251dcdcc39 | |||
ca3431b731 | |||
2242646634 | |||
f896673603 | |||
9a9e76fe6a | |||
9de39625c1 | |||
4b93f97120 |
1 changed files with 37 additions and 27 deletions
64
init.el
64
init.el
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
;;; Elpaca setup
|
;;; 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-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,6 +104,7 @@
|
||||||
(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
|
||||||
|
@ -194,6 +195,14 @@
|
||||||
: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
|
||||||
|
@ -358,16 +367,18 @@
|
||||||
;;; 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 "~/notes/planner.org"))
|
(find-file (file-name-concat notes-dir "planner.org")))
|
||||||
|
|
||||||
(defun bib ()
|
(defun bib ()
|
||||||
"Find the bibliography file."
|
"Find the bibliography file."
|
||||||
(interactive)
|
(interactive)
|
||||||
(find-file "~/notes/bibliography/bibliography.bib")
|
(find-file (file-name-concat notes-dir "bibliography/bibliography.bib"))
|
||||||
(end-of-buffer))
|
(end-of-buffer))
|
||||||
|
|
||||||
(use-package org
|
(use-package org
|
||||||
|
@ -376,8 +387,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 "~/notes/planner.org"))
|
(setq org-agenda-files (list (file-name-concat notes-dir "planner.org")))
|
||||||
(setq org-default-notes-file "~/notes/planner.org")
|
(setq org-default-notes-file (file-name-concat notes-dir "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
|
||||||
|
@ -398,7 +409,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")
|
(setq org-directory notes-dir)
|
||||||
|
|
||||||
(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)
|
||||||
|
@ -437,13 +448,13 @@
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
(quote
|
(quote
|
||||||
(("t" "Task" entry
|
(("t" "Task" entry
|
||||||
(file+olp "~/notes/planner.org" "Inbox")
|
(file+olp (file-name-concat notes-dir "planner.org") "Inbox")
|
||||||
"** TODO %?")
|
"** TODO %?")
|
||||||
("n" "Note" entry
|
("n" "Note" entry
|
||||||
(file+olp "~/notes/planner.org" "Inbox")
|
(file+olp (file-name-concat notes-dir "planner.org") "Inbox")
|
||||||
"** %?")
|
"** %?")
|
||||||
("e" "Event" entry
|
("e" "Event" entry
|
||||||
(file+olp "~/notes/planner.org" "Inbox")
|
(file+olp (file-name-concat notes-dir "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
|
||||||
|
@ -528,7 +539,7 @@
|
||||||
:after (org)
|
:after (org)
|
||||||
:config
|
:config
|
||||||
(setq org-pandoc-options '((standalone . t)
|
(setq org-pandoc-options '((standalone . t)
|
||||||
(bibliography . "~/notes/bibliography/bibliography.bib"))))
|
(bibliography . (file-name-concat notes-dir "bibliography/bibliography.bib")))))
|
||||||
|
|
||||||
(use-package ox-gfm
|
(use-package ox-gfm
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -566,8 +577,8 @@
|
||||||
(use-package citar
|
(use-package citar
|
||||||
:ensure t
|
:ensure t
|
||||||
:custom
|
:custom
|
||||||
(org-cite-global-bibliography '("~/notes/bibliography/bibliography.bib"))
|
(org-cite-global-bibliography `(,(file-name-concat notes-dir "bibliography/bibliography.bib")))
|
||||||
(org-cite-csl-styles-dir "~/notes/bibliography/")
|
(org-cite-csl-styles-dir (file-name-concat notes-dir "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"))))
|
||||||
|
@ -633,7 +644,7 @@
|
||||||
:ensure t
|
:ensure t
|
||||||
:after org
|
:after org
|
||||||
:custom
|
: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)
|
: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)
|
||||||
|
@ -676,7 +687,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)))
|
||||||
|
@ -723,7 +734,6 @@
|
||||||
(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)))
|
||||||
|
@ -749,9 +759,11 @@
|
||||||
: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 forge
|
(use-package git-link
|
||||||
:ensure t
|
:ensure t
|
||||||
:after magit)
|
:after transient
|
||||||
|
:config
|
||||||
|
(require 'git-link-transient))
|
||||||
|
|
||||||
(use-package eglot
|
(use-package eglot
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
@ -812,8 +824,10 @@
|
||||||
(use-package rust-mode
|
(use-package rust-mode
|
||||||
:ensure t)
|
:ensure t)
|
||||||
|
|
||||||
(use-package pyvenv
|
(use-package pet
|
||||||
:ensure t)
|
:ensure t
|
||||||
|
:config
|
||||||
|
(add-hook 'python-base-mode-hook 'pet-mode -10))
|
||||||
|
|
||||||
(use-package paredit
|
(use-package paredit
|
||||||
:ensure t
|
:ensure t
|
||||||
|
@ -888,13 +902,6 @@
|
||||||
: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"
|
||||||
|
@ -986,6 +993,7 @@
|
||||||
(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))
|
||||||
|
@ -1009,6 +1017,8 @@
|
||||||
(lambda () (when (file-exists-p custom-file)
|
(lambda () (when (file-exists-p custom-file)
|
||||||
(load custom-file 'noerror))))
|
(load custom-file 'noerror))))
|
||||||
|
|
||||||
(message "Successfully loaded entire config!")
|
(use-package gptel
|
||||||
|
:ensure t)
|
||||||
|
|
||||||
|
(message "Successfully loaded entire config!")
|
||||||
;;; init.el ends here
|
;;; init.el ends here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue