summaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/emacs.org121
1 files changed, 121 insertions, 0 deletions
diff --git a/.emacs.d/emacs.org b/.emacs.d/emacs.org
new file mode 100644
index 0000000..319f9ea
--- /dev/null
+++ b/.emacs.d/emacs.org
@@ -0,0 +1,121 @@
+#+TITLE: Emacs Configuration
+#+PROPERTY: header-args :tangle test.el
+#+auto_tangle: t
+
+* TODO Setting up
+Packages
+
+#+begin_src emacs-lisp
+ (require 'package)
+ ;; recheck | Add custon snippets to my path
+ (add-to-list 'load-path "~/dotfiles/.emacs.d/snippets")
+
+ ;; Add the entire dotfiles folder in path,
+ ;; in case we need to load from .exwm.el
+ (add-to-list 'load-path "~/dotfiles")
+
+ ;; Set custom.el in a different file, in user-emacs-directory
+ (setq custom-file (concat user-emacs-directory "/custom.el"))
+#+end_src
+** Setup for GuixSD machines
+We check ~$HOSTNAME~ if it's one of my devices running GuixSD, if ~t~
+we use ~guix-emacs-autoload-packages~ to load emacs packages installed using guix
+/If you are running guix, change the following hostnames ~fsociety~ or ~heisenberg~ to your own/
+#+begin_src emacs-lisp
+ (when (or (string= (system-name) "fsociety")
+ (string= (system-name) "heisenberg"))
+ (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp")
+ (guix-emacs-autoload-packages))
+#+end_src
+** Define and install packages
+First, we set our ~package-archives~
+#+begin_src emacs-lisp
+(setq package-archives '(("melpa" . "https://melpa.org/packages/")
+ ("org" . "https://orgmode.org/elpa/")
+ ("elpa" . "https://elpa.gnu.org/packages/")))
+#+end_src
+Load our emacs packages and activate them
+#+begin_src emacs-lisp
+(package-initialize)
+(unless package-archive-contents
+ (package-refresh-contents))
+#+end_src
+
+Now we list our packages in ~my-package-list~
+#+begin_src emacs-lisp
+(defconst my-package-list '(org-snooze
+ all-the-icons
+ general
+ doom-themes
+ doom-modeline
+ counsel
+ which-key
+ ivy
+ ivy-rich
+ all-the-icons-ivy-rich
+ helpful
+ org
+ org-modern
+ visual-fill-column
+ rainbow-delimiters
+ flycheck
+ lsp-mode
+ lsp-ui
+ json-mode
+ rjsx-mode
+ typescript-mode
+ python-mode
+ pyvenv
+ company
+ company-box
+ magit
+ elfeed
+ elfeed-goodies
+ paredit
+ corfu
+ monkeytype
+ sudo-edit
+ exwm
+ exwm-mff
+ exwm-firefox-core
+ consult
+ alsamixer
+ simple-httpd
+ circe
+ eshell-syntax-highlighting
+ pdf-tools
+ org-superstar
+ mastodon))
+#+end_src
+Now we define a list to be populated at each startup.
+/Contains the list of packages that need to be installed/
+#+begin_src emacs-lisp
+(defvar my-missing-packages '()
+#+end_src
+
+Install missing packages
+#+begin_src emacs-lisp
+(dolist (p my-package-list)
+ (when (not (package-installed-p p))
+ (add-to-list 'my-missing-packages p)))
+
+(when my-missing-packages
+ (message "Emacs is now refreshing its package database...")
+ (package-refresh-contents)
+ ;; Install the missing packages
+ (dolist (p my-missing-packages)
+ (message "Installing `%s' .." p)
+ (package-install p))
+ (setq my-missing-packages '()))
+
+(unless (package-installed-p 'use-package)
+(package-install 'use-package))
+#+end_src
+
+* TODO Function
+* TODO email-module
+* TODO keys.el
+* TODO all-the-icons-dired.el
+* TODO org-config
+* UI Settings
+** Basic UI