├── .gitignore ├── README.org ├── early-init.el ├── emacs.desktop ├── init.el ├── lisp ├── .elisp-autofmt ├── core-emacs-config.el ├── core-emacs-packages-config.el ├── external-packages-config.el └── vn.el ├── org └── projects-todo.org ├── systemd_service └── emacs.service └── vendor └── ditaa0_9.jar /.gitignore: -------------------------------------------------------------------------------- 1 | # Root folder 2 | /* 3 | !.gitignore 4 | !init.el 5 | !early-init.el 6 | !README.org 7 | !emacs.desktop 8 | !eshell/alias 9 | !lisp/ 10 | !org/ 11 | !systemd_service 12 | !vendor/ 13 | 14 | -------------------------------------------------------------------------------- /README.org: -------------------------------------------------------------------------------- 1 | * My dot files 2 | 3 | This repo is where I keep my dot files for easy bootstrapping my development environment. It is heavily geared towards Elixir development. 4 | 5 | It is currently aiming Emacs 29+. It uses built-in ~use-package~, ~eglot~, ~tree-sitter~ and so on. 6 | 7 | For initial setup, there are some things that might still need to be installed/run. Some of them are described in comments but not all of them =/ 8 | 9 | Intended for personal use! No guarantees are given here whatsoever! 10 | -------------------------------------------------------------------------------- /early-init.el: -------------------------------------------------------------------------------- 1 | ;;; early-init.el -*- lexical-binding: t; -*- 2 | 3 | ;; Increase the GC threshold for faster startup 4 | ;; The default is 800 kilobytes. Measured in bytes. 5 | (setq gc-cons-threshold (* 50 1000 1000)) 6 | 7 | ;; Prefer loading newest compiled .el file 8 | (customize-set-variable 'load-prefer-newer noninteractive) 9 | 10 | ;;; package configuration 11 | (require 'package) 12 | (require 'use-package-ensure) 13 | 14 | (add-to-list 'package-archives '("stable" . "https://stable.melpa.org/packages/") t) 15 | (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) 16 | 17 | (customize-set-variable 18 | 'package-archive-priorities 19 | '(("gnu" . 99) ; prefer GNU packages 20 | ("nongnu" . 80) ; use non-gnu packages if 21 | ; not found in GNU elpa 22 | ("stable" . 70) ; prefer "released" versions 23 | ; from melpa 24 | ("melpa" . 0))) ; if all else fails, get it 25 | ; from melpa 26 | 27 | (package-initialize) 28 | 29 | ; fetch the list of packages available 30 | (unless package-archive-contents 31 | (package-refresh-contents)) 32 | 33 | (setq use-package-always-ensure t) 34 | 35 | (use-package diminish) 36 | (use-package bind-key) 37 | 38 | ;; Native compilation settings 39 | (when (featurep 'native-compile) 40 | ;; Silence compiler warnings as they can be pretty disruptive 41 | (setq native-comp-async-report-warnings-errors nil) 42 | 43 | ;; Make native compilation happens asynchronously 44 | (setq native-comp-deferred-compilation t) 45 | 46 | ;; Set the right directory to store the native compilation cache 47 | ;; NOTE the method for setting the eln-cache directory depends on the emacs version 48 | (when (fboundp 'startup-redirect-eln-cache) 49 | (if (version< emacs-version "29") 50 | (add-to-list 51 | 'native-comp-eln-load-path 52 | (convert-standard-filename (expand-file-name "var/eln-cache/" user-emacs-directory))) 53 | (startup-redirect-eln-cache 54 | (convert-standard-filename (expand-file-name "var/eln-cache/" user-emacs-directory))))) 55 | 56 | (add-to-list 'native-comp-eln-load-path (expand-file-name "eln-cache/" user-emacs-directory))) 57 | 58 | ;; Make the initial buffer load faster by setting its mode to fundamental-mode 59 | (customize-set-variable 'initial-major-mode 'fundamental-mode) 60 | 61 | ;; Always start maximized 62 | (add-to-list 'default-frame-alist '(fullscreen . maximized)) 63 | -------------------------------------------------------------------------------- /emacs.desktop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env xdg-open 2 | [Desktop Entry] 3 | Name=Emacs 4 | GenericName=Text Editor 5 | Comment=Edit text 6 | MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; 7 | Exec=emacsclient -c %f 8 | Icon=emacs 9 | Type=Application 10 | Terminal=false 11 | Categories=Utility;TextEditor;X-Red-Hat-Base; 12 | StartupWMClass=Emacs 13 | -------------------------------------------------------------------------------- /init.el: -------------------------------------------------------------------------------- 1 | ;;; init.el --- Summary: 2 | 3 | ;;; Commentary: 4 | ;;; Emacs initialization and configuration 5 | 6 | ;;; Code: 7 | (load-file (expand-file-name "lisp/core-emacs-config.el" user-emacs-directory)) 8 | (load-file (expand-file-name "lisp/core-emacs-packages-config.el" user-emacs-directory)) 9 | (load-file (expand-file-name "lisp/external-packages-config.el" user-emacs-directory)) 10 | 11 | (provide 'init) 12 | ;;; init.el ends here 13 | -------------------------------------------------------------------------------- /lisp/.elisp-autofmt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorolinasc/dot_emacs/62a6a00e5d4989183485dcda72249579b5031a9e/lisp/.elisp-autofmt -------------------------------------------------------------------------------- /lisp/core-emacs-config.el: -------------------------------------------------------------------------------- 1 | ;;; core-emacs-config.el --- Summary: 2 | 3 | ;;; Commentary: 4 | ;;; Configuration of core emacs variables, hooks and so on 5 | 6 | (use-package 7 | emacs 8 | :ensure nil 9 | :hook (after-init . (lambda () (setq gc-cons-threshold (* 2 1000 1000)))) 10 | :custom 11 | 12 | ;; Set custom file early 13 | (custom-file (expand-file-name "lisp/.custom.el" user-emacs-directory)) 14 | 15 | ;; Introduction 16 | (user-full-name "Victor Oliveira Nascimento") 17 | 18 | ;; Tune system limits 19 | (gc-cons-threshold (* 20 1024 1024)) 20 | (read-process-output-max (* 1024 1024)) 21 | 22 | (load-prefer-newer t) 23 | (bidi-paragraph-direction 'left-to-right) 24 | (initial-scratch-message "") 25 | ;; store all backup and autosave files in the tmp dir 26 | (backup-directory-alist `((".*" . ,temporary-file-directory))) 27 | (auto-save-file-name-transforms `((".*" ,temporary-file-directory t))) 28 | (create-lockfiles nil) 29 | (fill-column 100) 30 | (inhibit-startup-screen t) 31 | 32 | (line-spacing 0.1) 33 | 34 | (indent-tabs-mode nil) 35 | (lisp-indent-function nil) 36 | (lisp-indent-offset 2) 37 | (use-short-answers t) 38 | ;; Should use: 39 | ;; (mapc #'treesit-install-language-grammar (mapcar #'car treesit-language-source-alist)) 40 | ;; at least once per installation or while changing this list 41 | (treesit-language-source-alist 42 | '((bash "https://github.com/tree-sitter/tree-sitter-bash") 43 | (cmake "https://github.com/uyha/tree-sitter-cmake") 44 | (css "https://github.com/tree-sitter/tree-sitter-css") 45 | (elisp "https://github.com/Wilfred/tree-sitter-elisp") 46 | (heex "https://github.com/phoenixframework/tree-sitter-heex") 47 | (elixir "https://github.com/elixir-lang/tree-sitter-elixir") 48 | (go "https://github.com/tree-sitter/tree-sitter-go") 49 | (html "https://github.com/tree-sitter/tree-sitter-html") 50 | (java "https://github.com/tree-sitter/tree-sitter-java") 51 | (javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src") 52 | (json "https://github.com/tree-sitter/tree-sitter-json") 53 | (kotlin "https://github.com/fwcd/tree-sitter-kotlin") 54 | (make "https://github.com/alemuller/tree-sitter-make") 55 | (markdown "https://github.com/ikatyang/tree-sitter-markdown") 56 | (python "https://github.com/tree-sitter/tree-sitter-python") 57 | (rust "https://github.com/tree-sitter/tree-sitter-rust") 58 | (toml "https://github.com/tree-sitter/tree-sitter-toml") 59 | (tsx "https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src") 60 | (typescript "https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src") 61 | (yaml "https://github.com/ikatyang/tree-sitter-yaml"))) 62 | 63 | (major-mode-remap-alist 64 | '((yaml-mode . yaml-ts-mode) 65 | (bash-mode . bash-ts-mode) 66 | (js2-mode . js-ts-mode) 67 | (typescript-mode . typescript-ts-mode) 68 | (java-mode . java-ts-mode) 69 | (json-mode . json-ts-mode) 70 | (kotlin-mode . kotlin-ts-mode) 71 | (css-mode . css-ts-mode) 72 | (python-mode . python-ts-mode) 73 | (rust-mode . rust-ts-mode) 74 | (elixir-mode . elixir-ts-mode))) 75 | 76 | :init 77 | (load custom-file 'noerror) 78 | (setq-default bidi-paragraph-direction 'left-to-right) 79 | (prefer-coding-system 'utf-8) 80 | (set-default-coding-systems 'utf-8) 81 | (set-terminal-coding-system 'utf-8) 82 | (set-keyboard-coding-system 'utf-8) 83 | (global-hl-line-mode +1) 84 | (setq-default indent-tabs-mode nil) 85 | 86 | ;; Fonts 87 | (set-face-attribute 'default nil :font "Fira Code" :height 170 :weight 'light) 88 | (set-face-attribute 'fixed-pitch nil :font "Fira Code" :height 170 :weight 'light) 89 | (set-face-attribute 'variable-pitch nil :font "Droid Sans" :height 170 :weight 'light) 90 | 91 | :config 92 | (global-display-line-numbers-mode) 93 | (column-number-mode t) 94 | (size-indication-mode t) 95 | (delete-selection-mode 1) 96 | (fset 'display-startup-echo-area-message #'ignore) 97 | (menu-bar-mode -1) 98 | (tool-bar-mode -1) 99 | (scroll-bar-mode -1) 100 | 101 | (defun vn/customize-frame () 102 | ;; Ensure cursor has the same color when run on daemon or not 103 | (set-cursor-color "DeepSkyBlue")) 104 | 105 | (if (daemonp) 106 | (add-hook 'server-after-make-frame-hook #'vn/customize-frame) 107 | (vn/customize-frame)) 108 | 109 | (unbind-key "C-z") 110 | (global-prettify-symbols-mode) 111 | 112 | (load-file (expand-file-name "lisp/vn.el" user-emacs-directory)) 113 | 114 | :bind 115 | ;; C-x C-0 restores the default font size 116 | (("C-+" . text-scale-increase) 117 | ("C--" . text-scale-decrease) 118 | ("" . treemacs) 119 | ("" . flymake-show-buffer-diagnostics) 120 | ("" . vterm) 121 | ("C-o" . other-window) 122 | ("s-b" . switch-to-buffer) 123 | ("C-q" . kill-buffer))) 124 | 125 | ;;; core-emacs-config.el ends here 126 | -------------------------------------------------------------------------------- /lisp/core-emacs-packages-config.el: -------------------------------------------------------------------------------- 1 | ;;; core-emacs-packages-config.el --- Summary: 2 | 3 | ;;; Commentary: 4 | ;;; Configuration of core emacs packages 5 | 6 | (use-package 7 | flyspell 8 | :ensure nil 9 | :config 10 | (setq 11 | ispell-program-name "aspell" 12 | ispell-dictionary "en") 13 | (add-hook 'text-mode-hook #'flyspell-mode) (add-hook 'prog-mode-hook #'flyspell-prog-mode)) 14 | 15 | (use-package eldoc :ensure nil :diminish eldoc-mode) 16 | (use-package autorevert :ensure nil :diminish auto-revert-mode) 17 | 18 | (use-package 19 | dired 20 | :ensure nil 21 | :defer t 22 | :config 23 | (setq 24 | dired-auto-revert-buffer t ; Revert on re-visiting 25 | ;; Better dired flags: 26 | ;; `-l' is mandatory 27 | ;; `-a' shows all files 28 | ;; `-h' uses human-readable sizes 29 | ;; `-F' appends file-type classifiers to file names (for better highlighting) 30 | dired-listing-switches "-laFGh1v --group-directories-first" 31 | dired-ls-F-marks-symlinks t ; -F marks links with @ 32 | ;; Inhibit prompts for simple recursive operations 33 | dired-recursive-copies 'always 34 | ;; Auto-copy to other Dired split window 35 | dired-dwim-target t)) 36 | 37 | (use-package project :ensure nil :bind ("s-f" . project-find-file)) 38 | 39 | (use-package 40 | eglot 41 | :ensure nil 42 | :config 43 | (add-to-list 44 | 'eglot-server-programs `((elixir-ts-mode heex-ts-mode elixir-mode) . ("language_server.sh")))) 45 | 46 | (use-package rust-ts-mode :ensure nil :defer t :hook (rust-ts-mode . eglot-ensure)) 47 | -------------------------------------------------------------------------------- /lisp/external-packages-config.el: -------------------------------------------------------------------------------- 1 | ;;; external-packages-config.el --- Summary: 2 | 3 | ;;; Commentary: 4 | ;;; Configuration of external packages fetches with use-package 5 | 6 | (use-package 7 | exec-path-from-shell 8 | :config 9 | (exec-path-from-shell-copy-env "SSH_AUTH_SOCK") 10 | (exec-path-from-shell-copy-env "JAVA_HOME") 11 | (exec-path-from-shell-initialize)) 12 | 13 | (use-package 14 | vterm 15 | :config (add-hook 'vterm-mode-hook (lambda () (display-line-numbers-mode -1))) 16 | :bind (("C-o" . other-window) ("" . treemacs))) 17 | 18 | (use-package multi-vterm :bind ("" . multi-vterm-project)) 19 | 20 | (use-package 21 | helpful 22 | :bind 23 | ("C-h f" . helpful-callable) 24 | ("C-h v" . helpful-variable) 25 | ("C-h k" . helpful-key) 26 | ("C-h F" . helpful-function) 27 | ("C-h C" . helpful-command)) 28 | 29 | (use-package which-key :config (which-key-mode)) 30 | 31 | (defun corfu-enable-in-minibuffer () 32 | "Enable Corfu in the minibuffer if `completion-at-point' is bound." 33 | (when (where-is-internal #'completion-at-point (list (current-local-map))) 34 | ;; (setq-local corfu-auto nil) ;; Enable/disable auto completion 35 | (setq-local 36 | corfu-echo-delay nil ;; Disable automatic echo and (point)opup 37 | corfu-popupinfo-delay nil) 38 | (corfu-mode 1))) 39 | 40 | (use-package 41 | corfu 42 | :bind 43 | (:map 44 | corfu-map 45 | ("" . corfu-quit) 46 | ("" . corfu-insert) 47 | ("M-n" . corfu-popupinfo-scroll-up) 48 | ("M-p" . corfu-popupinfo-scroll-down)) 49 | :custom 50 | ;; Works with `indent-for-tab-command'. Make sure tab doesn't indent when you 51 | ;; want to perform completion 52 | (tab-always-indent 'complete) (corfu-auto nil) (corfu-auto-prefix 2) (corfu-auto-delay 0.25) 53 | 54 | (corfu-preview-current 'insert) (corfu-preselect-first t) 55 | :init (global-corfu-mode) (corfu-popupinfo-mode) (corfu-echo-mode) 56 | :hook (minibuffer-setup . corfu-enable-in-minibuffer)) 57 | 58 | (use-package 59 | cape 60 | ;; Bind dedicated completion commands 61 | ;; Alternative prefix keys: C-c p, M-p, M-+, ... 62 | :bind 63 | (("M-/" . completion-at-point) ;; capf 64 | ("C-c p t" . complete-tag) ;; etags 65 | ("C-c p d" . cape-dabbrev) ;; or dabbrev-completion 66 | ("C-c p h" . cape-history) 67 | ("C-c p f" . cape-file) 68 | ("C-c p k" . cape-keyword) 69 | ("C-c p s" . cape-symbol) 70 | ("C-c p a" . cape-abbrev) 71 | ("C-c p i" . cape-ispell) 72 | ("C-c p l" . cape-line) 73 | ("C-c p w" . cape-dict) 74 | ("C-c p \\" . cape-tex) 75 | ("C-c p _" . cape-tex) 76 | ("C-c p ^" . cape-tex) 77 | ("C-c p &" . cape-sgml) 78 | ("C-c p r" . cape-rfc1345)) 79 | :init 80 | ;; Add `completion-at-point-functions', used by `completion-at-point'. 81 | (add-to-list 'completion-at-point-functions #'cape-file) 82 | (add-to-list 'completion-at-point-functions #'cape-dabbrev) 83 | (add-to-list 'completion-at-point-functions #'cape-ispell) 84 | (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)) 85 | 86 | ;; Enable vertico 87 | (use-package vertico :init (vertico-mode)) 88 | 89 | (use-package 90 | consult 91 | :bind 92 | ( ;; C-c bindings (mode-specific-map) 93 | ("C-x b" . consult-buffer) ;; orig. switch-to-buffer 94 | ("C-x p b" . consult-project-buffer) ;; orig. project-switch-to-buffer 95 | ("s-b" . consult-project-buffer) ;; orig. project-switch-to-buffer 96 | ;; Other custom bindings 97 | ("M-y" . consult-yank-pop) ;; orig. yank-pop 98 | ("M-g f" . consult-flymake) ;; Alternative: consult-flycheck 99 | ("M-g g" . consult-goto-line) ;; orig. goto-line 100 | ("M-g i" . consult-imenu) 101 | ("M-g I" . consult-imenu-multi) 102 | ;; M-s bindings (search-map) 103 | ("M-s d" . consult-find) 104 | ("M-s D" . consult-locate) 105 | ("M-s g" . consult-grep) 106 | ("M-s G" . consult-git-grep) 107 | ("M-s r" . consult-ripgrep) 108 | ("M-s l" . consult-line) 109 | ("C-s" . consult-line) 110 | ("M-s L" . consult-line-multi) 111 | ("M-s m" . consult-multi-occur) 112 | ("M-s u" . consult-focus-lines) 113 | :map 114 | isearch-mode-map 115 | ("M-e" . consult-isearch-history) ;; orig. isearch-edit-string 116 | ("M-s e" . consult-isearch-history) ;; orig. isearch-edit-string 117 | ("M-s l" . consult-line) ;; needed by consult-line to detect isearch 118 | ("M-s L" . consult-line-multi) ;; needed by consult-line to detect isearch 119 | ;; Minibuffer history 120 | :map 121 | minibuffer-local-map 122 | ("M-s" . consult-history) ;; orig. next-matching-history-element 123 | ("M-r" . consult-history)) ;; orig. previous-matching-history-element 124 | 125 | :hook (completion-list-mode . consult-preview-at-point-mode)) 126 | 127 | ;; Optionally use the `orderless' completion style. 128 | (use-package 129 | orderless 130 | :init 131 | (setq 132 | completion-styles '(orderless basic) 133 | completion-category-defaults nil 134 | completion-category-overrides '((file (styles partial-completion))))) 135 | 136 | ;; Persist history over Emacs restarts. Vertico sorts by history position. 137 | (use-package savehist :init (savehist-mode)) 138 | 139 | (use-package 140 | marginalia 141 | :init 142 | ;; Must be in the :init section of use-package such that the mode gets 143 | ;; enabled right away. Note that this forces loading the package. 144 | (marginalia-mode)) 145 | 146 | (use-package svg-lib) 147 | 148 | (use-package 149 | kind-icon 150 | :after 151 | corfu 152 | svg-lib 153 | :custom 154 | (kind-icon-default-face 'corfu-default) ; to compute blended backgrounds correctly 155 | :config 156 | (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter) 157 | (setq kind-icon-default-style '(:padding -1 :stroke 0 :margin 0 :radius 0 :height 0.4 :scale 1.0))) 158 | 159 | (use-package deadgrep :commands deadgrep :bind ("C-S-f" . deadgrep)) 160 | (use-package move-text :config (move-text-default-bindings)) 161 | 162 | (use-package 163 | smartparens 164 | :bind 165 | (:map 166 | smartparens-mode-map 167 | ("C-M-k" . sp-kill-sexp) 168 | ("C-M-w" . sp-copy-sexp) 169 | ("M-" . sp-unwrap-sexp) 170 | ("M-" . sp-backward-unwrap-sexp) 171 | ("C-" . sp-forward-slurp-sexp) 172 | ("C-" . sp-forward-barf-sexp) 173 | ("C-M-" . sp-backward-slurp-sexp) 174 | ("C-M-" . sp-backward-barf-sexp) 175 | ("M-D" . sp-splice-sexp) 176 | ("C-M-" . sp-splice-sexp-killing-forward) 177 | ("C-M-" . sp-splice-sexp-killing-backward) 178 | ("C-S-" . sp-splice-sexp-killing-around)) 179 | :diminish smartparens-mode 180 | :hook (prog-mode-hook . turn-on-smartparens-strict-mode) 181 | :config (require 'smartparens-config) (smartparens-global-mode)) 182 | 183 | (use-package rainbow-mode :diminish rainbow-mode) 184 | (use-package rainbow-delimiters :hook (prog-mode . rainbow-delimiters-mode)) 185 | 186 | (use-package 187 | super-save 188 | :defer t 189 | :custom 190 | ;; Disable auto-saving for remote files 191 | (super-save-remote-files nil) 192 | :config (super-save-mode)) 193 | 194 | (use-package markdown-mode :mode ("\\.md\\'" . gfm-mode)) 195 | 196 | (use-package 197 | treemacs 198 | :hook (treemacs-mode-hook . (lambda () (display-line-numbers-mode -1))) 199 | :config 200 | (treemacs-filewatch-mode t) 201 | (treemacs-git-mode 'simple)) 202 | 203 | (use-package treemacs-magit :after (treemacs magit)) 204 | (use-package treemacs-icons-dired :after (treemacs dired) :config (treemacs-icons-dired-mode)) 205 | 206 | (use-package magit :bind ("C-c m s" . magit-status)) 207 | 208 | (use-package restclient :defer t) 209 | (use-package ob-elixir :defer t) 210 | (use-package yasnippet :diminish yas-minor-mode :config (yas-global-mode 1)) 211 | (use-package yasnippet-snippets :after (yasnippet)) 212 | 213 | (use-package 214 | elixir-ts-mode 215 | :hook (elixir-ts-mode . eglot-ensure) 216 | (elixir-ts-mode 217 | . 218 | (lambda () 219 | (push '(">=" . ?\u2265) prettify-symbols-alist) 220 | (push '("<=" . ?\u2264) prettify-symbols-alist) 221 | (push '("!=" . ?\u2260) prettify-symbols-alist) 222 | (push '("==" . ?\u2A75) prettify-symbols-alist) 223 | (push '("=~" . ?\u2245) prettify-symbols-alist) 224 | (push '("<-" . ?\u2190) prettify-symbols-alist) 225 | (push '("->" . ?\u2192) prettify-symbols-alist) 226 | (push '("<-" . ?\u2190) prettify-symbols-alist) 227 | (push '("|>" . ?\u25B7) prettify-symbols-alist))) 228 | (before-save . eglot-format)) 229 | 230 | (use-package 231 | exunit 232 | :diminish t 233 | :bind 234 | ("C-c e ." . exunit-verify-single) 235 | ("C-c e b" . exunit-verify) 236 | ("C-c e u a" . exunit-verify-all-in-umbrella) 237 | ("C-c e a" . exunit-verify-all) 238 | ("C-c e l" . exunit-rerun)) 239 | 240 | ;; On a clean build, we need to call 'all-the-icons-install-fonts' function 241 | (use-package all-the-icons :if (display-graphic-p)) 242 | 243 | (use-package erlang :defer t) 244 | 245 | (use-package cargo :defer t :hook (rust-ts-mode . cargo-minor-mode)) 246 | 247 | (use-package 248 | multiple-cursors 249 | :bind ("C->" . 'mc/mark-next-like-this) ("C-<" . 'mc/mark-previous-like-this)) 250 | 251 | (use-package yaml-mode) 252 | 253 | ;; JavaScript configuration 254 | (use-package js2-mode :init (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))) 255 | 256 | (use-package editorconfig :diminish editorconfig-mode :config (editorconfig-mode 1)) 257 | 258 | (use-package 259 | web-mode 260 | :init 261 | (setq 262 | web-mode-markup-indent-offset 2 263 | web-mode-css-indent-offset 2 264 | web-mode-code-indent-offset 2) 265 | :config 266 | (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) 267 | (add-to-list 'auto-mode-alist '("\\.eex?\\'" . web-mode))) 268 | 269 | (use-package ox-gfm) 270 | (use-package ox-spectacle) 271 | 272 | (use-package 273 | plantuml-mode 274 | :init 275 | (setq plantuml-jar-path 276 | (expand-file-name "vendor/plantuml.1.2019.7.jar" user-emacs-directory)) 277 | (setq plantuml-default-exec-mode "jar") 278 | :mode "\\.uml\\'") 279 | 280 | (use-package 281 | org 282 | :bind (("C-c a" . org-agenda)) 283 | :custom 284 | (org-hide-leading-stars t) 285 | (org-list-allow-alphabetical t) 286 | (org-src-fontify-natively t "You want this to activate coloring in blocks") 287 | (org-src-tab-acts-natively t "You want this to have completion in blocks") 288 | (org-hide-emphasis-markers t "This hides the *,=, or / markers") 289 | (org-pretty-entities t "to have \alpha, \to and others display as utf8") 290 | (org-pretty-entities-include-sub-superscripts nil) 291 | (org-export-with-sub-superscripts nil "Disable sub and superscripts in exports only") 292 | (org-ditaa-jar-path (expand-file-name "vendor/ditaa0_9.jar" user-emacs-directory)) 293 | (org-bulle) 294 | ; (org-bullets-bullet-list (quote ("◉" "◆" "✚" "☀" "○"))) 295 | (org-plantuml-jar-path (expand-file-name "vendor/plantuml.1.2019.7.jar" user-emacs-directory)) 296 | :config 297 | (org-babel-do-load-languages 298 | 'org-babel-load-languages 299 | '((emacs-lisp . t) (elixir . t) (org . t) (java . t) (ditaa . t) (plantuml . t)))) 300 | 301 | (use-package org-superstar :init (add-hook 'org-mode-hook (lambda () (org-superstar-mode 1)))) 302 | 303 | (use-package 304 | org-tree-slide 305 | :hook ((org-tree-slide-play . org-display-inline-images)) 306 | :custom (org-image-actual-width nil)) 307 | 308 | (use-package docker :pin melpa :bind ("C-c d" . docker)) 309 | (use-package kubernetes :commands (kubernetes-overview)) 310 | (use-package graphviz-dot-mode) 311 | 312 | (use-package 313 | elisp-autofmt 314 | :commands (elisp-autofmt-mode elisp-autofmt-buffer) 315 | :hook (emacs-lisp-mode . elisp-autofmt-mode)) 316 | 317 | (use-package mermaid-mode) 318 | (use-package solaire-mode :after doom-themes :init (solaire-global-mode +1)) 319 | 320 | (use-package 321 | doom-modeline 322 | :after all-the-icons 323 | :init (doom-modeline-mode) 324 | :custom (doom-modeline-height 35)) 325 | 326 | (use-package 327 | doom-themes 328 | :pin melpa 329 | :after (treemacs) 330 | :config 331 | (load-theme 'doom-vibrant t) 332 | (setq doom-themes-treemacs-theme "doom-colors") 333 | (setq doom-treemacs-enable-variable-pitch t) 334 | (doom-themes-treemacs-config)) 335 | 336 | (use-package 337 | kotlin-ts-mode 338 | :hook 339 | (kotlin-ts-mode . eglot-ensure) 340 | (before-save . eglot-format) 341 | :mode ("\\.kt\\'" "\\.kts\\'")) 342 | 343 | ;;; external-packages-config.el ends here 344 | -------------------------------------------------------------------------------- /lisp/vn.el: -------------------------------------------------------------------------------- 1 | ;;; vn.el --- Summary: 2 | 3 | ;;; Commentary: 4 | ;;; My useful functions :) 5 | 6 | (defun vn/init-el () 7 | "Opens init.el" 8 | (interactive) 9 | (find-file "~/.emacs.d/init.el")) 10 | 11 | (defun vn/earyly-init-el () 12 | "Opens early-init.el" 13 | (interactive) 14 | (find-file "~/.emacs.d/early-init.el")) 15 | 16 | (defun vn/core-emacs-config-el () 17 | "Opens core-emacs-config.el" 18 | (interactive) 19 | (find-file "~/.emacs.d/lisp/core-emacs-config.el")) 20 | 21 | (defun vn/core-emacs-packages-config-el () 22 | "Opens core-emacs-packages-config.el" 23 | (interactive) 24 | (find-file "~/.emacs.d/lisp/core-emacs-packages-config.el")) 25 | 26 | (defun vn/external-packages-config-el () 27 | "Opens external-packages-config.el" 28 | (interactive) 29 | (find-file "~/.emacs.d/lisp/external-packages-config.el")) 30 | 31 | ;;; vn.el ends here 32 | -------------------------------------------------------------------------------- /org/projects-todo.org: -------------------------------------------------------------------------------- 1 | #+OPTIONS: ^:{} 2 | 3 | * [[elisp:(org-projectile-open-project%20".emacs.d")][.emacs.d]] [0/0] 4 | :PROPERTIES: 5 | :CATEGORY: .emacs.d 6 | :END: 7 | ** TODO clean up my configuration 8 | -------------------------------------------------------------------------------- /systemd_service/emacs.service: -------------------------------------------------------------------------------- 1 | ## If your Emacs is installed in a non-standard location, you may need 2 | ## to copy this file to a standard directory, eg ~/.config/systemd/user/ . 3 | ## If you install this file by hand, change the "Exec" lines below 4 | ## to use absolute file names for the executables. 5 | [Unit] 6 | Description=Emacs text editor 7 | Documentation=info:emacs man:emacs(1) https://gnu.org/software/emacs/ 8 | 9 | [Service] 10 | Type=simple 11 | ExecStart=/usr/bin/emacs --fg-daemon -F "'(fullscreen . maximized)" 12 | ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)" 13 | Environment=SSH_AUTH_SOCK=%t/keyring/ssh 14 | Restart=on-failure 15 | 16 | [Install] 17 | WantedBy=default.target 18 | -------------------------------------------------------------------------------- /vendor/ditaa0_9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/victorolinasc/dot_emacs/62a6a00e5d4989183485dcda72249579b5031a9e/vendor/ditaa0_9.jar --------------------------------------------------------------------------------