diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | init.el | 130 |
2 files changed, 125 insertions, 6 deletions
@@ -1,5 +1,6 @@ | |||
1 | auto-save-list/ | 1 | auto-save-list/ |
2 | bookmarks | 2 | bookmarks |
3 | .cache/ | ||
3 | eln-cache/ | 4 | eln-cache/ |
4 | org-roam.db | 5 | org-roam.db |
5 | projectile.cache | 6 | projectile.cache |
@@ -117,7 +117,7 @@ | |||
117 | (tool-bar-mode -1) | 117 | (tool-bar-mode -1) |
118 | (tooltip-mode -1) | 118 | (tooltip-mode -1) |
119 | (menu-bar-mode -1) | 119 | (menu-bar-mode -1) |
120 | (set-fringe-mode -1) | 120 | (set-fringe-mode 5) |
121 | (setq ring-bell-function 'ignore) | 121 | (setq ring-bell-function 'ignore) |
122 | (setq use-dialog-box nil | 122 | (setq use-dialog-box nil |
123 | inhibit-startup-message t | 123 | inhibit-startup-message t |
@@ -300,7 +300,8 @@ | |||
300 | 300 | ||
301 | ;; Disable line numbers in specific modes | 301 | ;; Disable line numbers in specific modes |
302 | (dolist (mode '(org-mode-hook | 302 | (dolist (mode '(org-mode-hook |
303 | org-agenda-mode-hook)) | 303 | org-agenda-mode-hook |
304 | helpful-mode-hook)) | ||
304 | (add-hook mode (lambda () (display-line-numbers-mode 0)))) | 305 | (add-hook mode (lambda () (display-line-numbers-mode 0)))) |
305 | 306 | ||
306 | 307 | ||
@@ -466,7 +467,7 @@ | |||
466 | (use-package projectile | 467 | (use-package projectile |
467 | :straight t | 468 | :straight t |
468 | :config | 469 | :config |
469 | (projectile-mode) | 470 | (add-hook 'after-init-hook 'projectile-global-mode) |
470 | (setq projectile-project-search-path '("~/Projects") | 471 | (setq projectile-project-search-path '("~/Projects") |
471 | projectile-known-projects-file "~/.emacs.d/projectile-known-projects.eld" | 472 | projectile-known-projects-file "~/.emacs.d/projectile-known-projects.eld" |
472 | projectile-cache-file "~/.emacs.d/projectile.cache") | 473 | projectile-cache-file "~/.emacs.d/projectile.cache") |
@@ -484,7 +485,27 @@ | |||
484 | (use-package magit | 485 | (use-package magit |
485 | :straight t | 486 | :straight t |
486 | :custom | 487 | :custom |
487 | (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) | 488 | (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1) |
489 | :config | ||
490 | (setq magit-diff-refine-hunk t | ||
491 | magit-diff-paint-whitespace t | ||
492 | magit-diff-paint-whitespace-lines t | ||
493 | magit-diff-highlight-trailing t)) | ||
494 | |||
495 | |||
496 | ;; --------------------------------- | ||
497 | ;; Highlight diff in fringe | ||
498 | ;; ------------------------ | ||
499 | ;; In buffers for git-controlled | ||
500 | ;; files, highlight changed lines in | ||
501 | ;; the fringe. | ||
502 | ;; --------------------------------- | ||
503 | |||
504 | (use-package diff-hl | ||
505 | :straight t | ||
506 | :hook | ||
507 | (prog-mode . diff-hl-mode) | ||
508 | (diff-hl-mode . diff-hl-flydiff-mode)) | ||
488 | 509 | ||
489 | 510 | ||
490 | 511 | ||
@@ -593,8 +614,7 @@ | |||
593 | (use-package link-hint | 614 | (use-package link-hint |
594 | :straight t | 615 | :straight t |
595 | :bind | 616 | :bind |
596 | ("C-c l o" . link-hint-open-link) | 617 | ("C-c n l o" . link-hint-open-link)) |
597 | ("C-c l c" . link-hint-copy-link)) | ||
598 | 618 | ||
599 | 619 | ||
600 | ;; --------------------------------- | 620 | ;; --------------------------------- |
@@ -777,6 +797,89 @@ | |||
777 | 797 | ||
778 | 798 | ||
779 | ;; --------------------------------------------------------------------- | 799 | ;; --------------------------------------------------------------------- |
800 | ;;; Development Environment | ||
801 | ;; ------------------------ | ||
802 | ;; MMOSMacs is intended to serve as a full-featured IDE | ||
803 | ;; --------------------------------------------------------------------- | ||
804 | |||
805 | ;; --------------------------------- | ||
806 | ;; Syntax checking | ||
807 | ;; --------------- | ||
808 | ;; I'd like to know when I'm making | ||
809 | ;; a mistake. | ||
810 | ;; --------------------------------- | ||
811 | |||
812 | ;; Flycheck is activated by specific language modes. | ||
813 | ;; See `:hook's in language modes below to see which ones use it. | ||
814 | (use-package flycheck | ||
815 | :straight t | ||
816 | :defer t) | ||
817 | |||
818 | |||
819 | ;; --------------------------------- | ||
820 | ;; Language Server Protocol (LSP) | ||
821 | ;; ------------------------------ | ||
822 | ;; Protocol for interaction between | ||
823 | ;; Emacs and language servers. | ||
824 | ;; --------------------------------- | ||
825 | |||
826 | (use-package lsp-mode | ||
827 | :straight t | ||
828 | :init (setq lsp-keymap-prefix "C-c l")) | ||
829 | |||
830 | |||
831 | ;; --------------------------------- | ||
832 | ;; Emacs Lisp | ||
833 | ;; ---------- | ||
834 | ;; The language we all know and love | ||
835 | ;; --------------------------------- | ||
836 | |||
837 | (use-package elisp-mode | ||
838 | :straight (:type built-in) | ||
839 | :commands (emacs-lisp-mode) | ||
840 | :hook (emacs-lisp-mode . flycheck-mode)) | ||
841 | |||
842 | |||
843 | ;; --------------------------------- | ||
844 | ;; Common Lisp | ||
845 | ;; ----------- | ||
846 | ;; The programmable language | ||
847 | ;; --------------------------------- | ||
848 | |||
849 | ;; Sly REPL | ||
850 | (use-package sly | ||
851 | :straight t | ||
852 | :config | ||
853 | (setq inferior-lisp-program "/usr/bin/sbcl")) | ||
854 | |||
855 | ;; Quicklisp integration for Sly | ||
856 | (use-package sly-quicklisp | ||
857 | :straight t) | ||
858 | |||
859 | |||
860 | ;; --------------------------------- | ||
861 | ;; sh / Bash | ||
862 | ;; ---------- | ||
863 | ;; Scripts for POSIX Shell and Bash. | ||
864 | ;; | ||
865 | ;; NOTE: The first time you use this | ||
866 | ;; configuration, you must run | ||
867 | ;; `M-x lsp-install-server RET bash-ls RET' | ||
868 | ;; --------------------------------- | ||
869 | |||
870 | ;; Configure sh-mode | ||
871 | (use-package sh-mode | ||
872 | :hook (sh-mode . flycheck-mode)) | ||
873 | |||
874 | ;; Configure LSP for sh / Bash | ||
875 | (use-package lsp-mode | ||
876 | :config | ||
877 | (setq lsp-bash-highlight-parsing-errors t)) | ||
878 | |||
879 | |||
880 | |||
881 | |||
882 | ;; --------------------------------------------------------------------- | ||
780 | ;;; Keybinds | 883 | ;;; Keybinds |
781 | ;; --------- | 884 | ;; --------- |
782 | ;; For now, just a few simple changes. | 885 | ;; For now, just a few simple changes. |
@@ -784,6 +887,21 @@ | |||
784 | ;; --------------------------------------------------------------------- | 887 | ;; --------------------------------------------------------------------- |
785 | 888 | ||
786 | ;; --------------------------------- | 889 | ;; --------------------------------- |
890 | ;; Keybind hints | ||
891 | ;; ------------- | ||
892 | ;; Show hints for available keybinds | ||
893 | ;; as you type them. | ||
894 | ;; --------------------------------- | ||
895 | |||
896 | (use-package which-key | ||
897 | :straight t | ||
898 | :init (which-key-mode) | ||
899 | :config | ||
900 | (setq which-key-idle-delay 1.5 | ||
901 | which-key-side-window-max-height 5)) | ||
902 | |||
903 | |||
904 | ;; --------------------------------- | ||
787 | ;; Fix ESC behavior | 905 | ;; Fix ESC behavior |
788 | ;; ---------------- | 906 | ;; ---------------- |
789 | ;; The default behavior of the ESC | 907 | ;; The default behavior of the ESC |