Arthur BARRAUX 65f1ac37ff test readme
2024-10-18 22:57:00 +02:00
2024-10-18 22:53:49 +02:00
2024-10-18 22:53:49 +02:00
2024-10-18 22:53:49 +02:00
2024-10-18 22:57:00 +02:00

My Emacs Configuration

Init

Package management

  (require 'use-package)
  (setq use-package-always-ensure t)

  (setq package-archives
	'(("GNU ELPA"     . "https://elpa.gnu.org/packages/")
	  ("MELPA Stable" . "https://stable.melpa.org/packages/")
	  ("MELPA"        . "https://melpa.org/packages/"))
	package-archive-priorities
	'(("GNU ELPA"     . 10)
	  ("MELPA"        . 5)
	  ("MELPA Stable" . 0)))

Theme

(load-theme 'zenburn t)

Encoding

  (set-language-environment "UTF-8")
  (prefer-coding-system 'utf-8)

Completion

  (use-package vertico)
  (use-package consult)
  (use-package marginalia)

Company

  (use-package company)
  (company-mode 1)

Key-binds

Dereference arrow

(defun print-arrow ()
  (interactive)
  (with-current-buffer (buffer-name);
    (insert "->")))

(keymap-global-set "ù" 'print-arrow)

Reload config

(defun reload-conf ()
  (interactive)
  (load-file "~/.emacs.default/init.el"))
(keymap-global-set "C-c r" 'reload-conf)

Open config

(defun open-config ()
  (interactive)
  (find-file "~/.emacs.default/config.org"))
(keymap-global-set "C-c c" 'open-config)

Window command

Split verticaly

(keymap-global-set "C-x é" 'split-window-below)

Split horizontally

(keymap-global-set "C-x \"" 'split-window-right)

Close window

(keymap-global-set "C-x à" 'delete-window)

Org

Org bullets

  (use-package org-bullets
    :config
    (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))

Font

    (font-lock-add-keywords 'org-mode
			    '(("^ *\\([-]\\) "
			       (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
  (custom-theme-set-faces
     'user
     '(variable-pitch ((t (:family "ETBembo" :height 220 :weight thin))))
     '(fixed-pitch ((t ( :family "Fira Code Retina" :height 200)))))
    (let* ((variable-tuple
	      (cond ((x-list-fonts "ETBembo")         '(:font "ETBembo"))
		    ((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro"))
		    ((x-list-fonts "Lucida Grande")   '(:font "Lucida Grande"))
		    ((x-list-fonts "Verdana")         '(:font "Verdana"))
		    ((x-family-fonts "Sans Serif")    '(:family "Sans Serif"))
		    (nil (warn "Cannot find a Sans Serif Font.  Install Source Sans Pro."))))
	     (base-font-color     (face-foreground 'default nil 'default))
	     (headline           `(:inherit default :weight bold :foreground ,base-font-color)))


      ;; Headlines
	(custom-theme-set-faces
	 'user
	 `(org-level-8 ((t (,@headline ,@variable-tuple))))
	 `(org-level-7 ((t (,@headline ,@variable-tuple))))
	 `(org-level-6 ((t (,@headline ,@variable-tuple))))
	 `(org-level-5 ((t (,@headline ,@variable-tuple))))
	 `(org-level-4 ((t (,@headline ,@variable-tuple :height 1.1))))
	 `(org-level-3 ((t (,@headline ,@variable-tuple :height 1.25))))
	 `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.5))))
	 `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.75))))
	 `(org-document-title ((t (,@headline ,@variable-tuple :height 2.0 :underline nil))))))

Emphasis markers

  (setq org-hide-emphasis-markers t)

Hooks

Variable pitch mode

(add-hook 'org-mode-hook 'variable-pitch-mode)

Visual line mode

(add-hook 'org-mode-hook 'visual-line-mode)

Custom faces

(custom-theme-set-faces
   'user
   '(org-block ((t (:inherit fixed-pitch))))
   '(org-code ((t (:inherit (shadow fixed-pitch)))))
   '(org-document-info ((t (:foreground "dark orange"))))
   '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch)))))
   '(org-indent ((t (:inherit (org-hide fixed-pitch)))))
   '(org-link ((t (:foreground "royal blue" :underline t))))
   '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch)))))
   '(org-property-value ((t (:inherit fixed-pitch))) t)
   '(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch)))))
   '(org-table ((t (:inherit fixed-pitch :foreground "#83a598"))))
   '(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold :height 0.8))))
   '(org-verbatim ((t (:inherit (shadow fixed-pitch))))))

Terminal

(use-package vterm)

Misceleaneous

Tool bar

(tool-bar-mode -1)

Menu bar

(menu-bar-mode -1)

Scroll bar

(scroll-bar-mode -1)

Global font

  (set-face-attribute 'default nil :family "Cascadia Mono" :height 200)
S
Description
No description provided
Readme 56 KiB
Languages
Org 100%