From 87b737675f5436a2e15bde9afdd00fdc1ba170ba Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sat, 20 May 2023 23:50:29 -0400 Subject: Show fringe and add `diff-hl` --- init.el | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 0548b84..bc64453 100644 --- a/init.el +++ b/init.el @@ -117,7 +117,7 @@ (tool-bar-mode -1) (tooltip-mode -1) (menu-bar-mode -1) -(set-fringe-mode -1) +(set-fringe-mode 5) (setq ring-bell-function 'ignore) (setq use-dialog-box nil inhibit-startup-message t @@ -487,6 +487,19 @@ (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) +;; --------------------------------- +;; Highlight diff in fringe +;; ------------------------ +;; In buffers for git-controlled +;; files, highlight changed lines in +;; the fringe. +;; --------------------------------- + +(use-package diff-hl + :straight t + :config (diff-hl-flydiff-mode)) + + ;; --------------------------------------------------------------------- -- cgit v1.2.3 From de1cd5c6bcffb35f48d7f396b766e94cbc0a0aec Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sat, 20 May 2023 23:54:10 -0400 Subject: Enable `global-diff-hl-mode` --- init.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index bc64453..df12d7d 100644 --- a/init.el +++ b/init.el @@ -497,7 +497,9 @@ (use-package diff-hl :straight t - :config (diff-hl-flydiff-mode)) + :config + (global-diff-hl-mode) + (diff-hl-flydiff-mode)) -- cgit v1.2.3 From e3176dd410d2ed5b5211c3aab64e48a09abb5574 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sat, 20 May 2023 23:57:07 -0400 Subject: Use hooks to start `diff-hl` mode only in `prog-mode` buffers --- init.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index df12d7d..3961269 100644 --- a/init.el +++ b/init.el @@ -497,9 +497,9 @@ (use-package diff-hl :straight t - :config - (global-diff-hl-mode) - (diff-hl-flydiff-mode)) + :hook + (prog-mode . diff-hl-mode) + (diff-hl-mode . diff-hl-flydiff-mode)) -- cgit v1.2.3 From e4f0d2dbf8accfad57e73b23df1be08c9bdd72d2 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sun, 21 May 2023 00:14:24 -0400 Subject: Use `flycheck` for syntax checking --- init.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/init.el b/init.el index 3961269..e4b5490 100644 --- a/init.el +++ b/init.el @@ -791,6 +791,27 @@ +;; --------------------------------------------------------------------- +;;; Development Environment +;; ------------------------ +;; MMOSMacs is intended to serve as a full-featured IDE +;; --------------------------------------------------------------------- + +;; --------------------------------- +;; Syntax checking +;; --------------- +;; I'd like to know when I'm making +;; a mistake. +;; --------------------------------- + +;; Flycheck +(use-package flycheck + :straight t + :init (global-flycheck-mode)) + + + + ;; --------------------------------------------------------------------- ;;; Keybinds ;; --------- -- cgit v1.2.3 From eb9832301553878a7181ce4e11b8c2cc239eaf3b Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sun, 21 May 2023 00:27:51 -0400 Subject: Setup `paredit` for Lisp modes --- init.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/init.el b/init.el index e4b5490..0ae6e4d 100644 --- a/init.el +++ b/init.el @@ -810,6 +810,18 @@ :init (global-flycheck-mode)) +;; --------------------------------- +;; Lisp development +;; ---------------- +;; Lisp is the best +;; --------------------------------- + +;; Structured editing of S-expr data +(use-package paredit + :straight t + :hook (emacs-lisp-mode . paredit-mode)) + + ;; --------------------------------------------------------------------- -- cgit v1.2.3 From d24519f99e754d225190fad7bc6dc88c744b97de Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sun, 21 May 2023 00:58:09 -0400 Subject: Use `paredit-mode` in `ielm` buffers --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index 0ae6e4d..8770357 100644 --- a/init.el +++ b/init.el @@ -819,7 +819,7 @@ ;; Structured editing of S-expr data (use-package paredit :straight t - :hook (emacs-lisp-mode . paredit-mode)) + :hook ((emacs-lisp-mode ielm-mode) . paredit-mode)) -- cgit v1.2.3 From b0373f1580719d80f632831c0bd05e14c5cb5596 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sun, 21 May 2023 01:59:02 -0400 Subject: Remove `paredit` for now because it's too confusing --- init.el | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/init.el b/init.el index 8770357..e4b5490 100644 --- a/init.el +++ b/init.el @@ -810,18 +810,6 @@ :init (global-flycheck-mode)) -;; --------------------------------- -;; Lisp development -;; ---------------- -;; Lisp is the best -;; --------------------------------- - -;; Structured editing of S-expr data -(use-package paredit - :straight t - :hook ((emacs-lisp-mode ielm-mode) . paredit-mode)) - - ;; --------------------------------------------------------------------- -- cgit v1.2.3 From 30b9a4ce0351db09160a3a1f81b36190ef75b581 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sun, 21 May 2023 15:27:16 -0400 Subject: Disable line numbers in `helpful-mode` --- init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index e4b5490..ffa2c6e 100644 --- a/init.el +++ b/init.el @@ -300,7 +300,8 @@ ;; Disable line numbers in specific modes (dolist (mode '(org-mode-hook - org-agenda-mode-hook)) + org-agenda-mode-hook + helpful-mode-hook)) (add-hook mode (lambda () (display-line-numbers-mode 0)))) -- cgit v1.2.3 From db458f34be933a3aec7a2c350f1ff3119ac07824 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sun, 21 May 2023 16:16:44 -0400 Subject: Use `which-key` for keybind hints --- init.el | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/init.el b/init.el index ffa2c6e..0a30c3d 100644 --- a/init.el +++ b/init.el @@ -820,6 +820,20 @@ ;; In the future there will be whole custom keybind system. ;; --------------------------------------------------------------------- +;; --------------------------------- +;; Keybind hints +;; ------------- +;; Show hints for available keybinds +;; as you type them. +;; --------------------------------- + +(use-package which-key + :straight t + :init (which-key-mode) + :config + (setq which-key-idle-delay 1.5)) + + ;; --------------------------------- ;; Fix ESC behavior ;; ---------------- -- cgit v1.2.3 From 952b7a55b6a9528e3cb98177edc94860b537f485 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sun, 21 May 2023 19:19:57 -0400 Subject: Add `lsp-mode` for IDE features --- init.el | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 0a30c3d..14055be 100644 --- a/init.el +++ b/init.el @@ -609,8 +609,7 @@ (use-package link-hint :straight t :bind - ("C-c l o" . link-hint-open-link) - ("C-c l c" . link-hint-copy-link)) + ("C-c n l o" . link-hint-open-link)) ;; --------------------------------- @@ -811,6 +810,18 @@ :init (global-flycheck-mode)) +;; --------------------------------- +;; Language Server Protocol (LSP) +;; ------------------------------ +;; Protocol for interaction between +;; Emacs and language servers. +;; --------------------------------- + +(use-package lsp-mode + :straight t + :init (setq lsp-keymap-prefix "C-c l")) + + ;; --------------------------------------------------------------------- -- cgit v1.2.3 From 6d6a9c85338a2261c130a934237eb30df878f7c2 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sun, 21 May 2023 20:59:25 -0400 Subject: Only start `flycheck-mode` in appropriate buffers --- init.el | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 14055be..8659832 100644 --- a/init.el +++ b/init.el @@ -806,8 +806,7 @@ ;; Flycheck (use-package flycheck - :straight t - :init (global-flycheck-mode)) + :straight t) ;; --------------------------------- @@ -822,6 +821,18 @@ :init (setq lsp-keymap-prefix "C-c l")) +;; --------------------------------- +;; Emacs Lisp +;; ---------- +;; The language we all know and love +;; --------------------------------- + +(use-package elisp-mode + :straight (:type built-in) + :commands (emacs-lisp-mode) + :hook (emacs-lisp-mode . flycheck-mode)) + + ;; --------------------------------------------------------------------- -- cgit v1.2.3 From 375c76e56b8ecc3e7880e6926cc2380919e92cde Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Sun, 21 May 2023 21:00:01 -0400 Subject: Refine Magit diff display --- init.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 8659832..4807df0 100644 --- a/init.el +++ b/init.el @@ -485,7 +485,12 @@ (use-package magit :straight t :custom - (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) + (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1) + :config + (setq magit-diff-refine-hunk t + magit-diff-paint-whitespace t + magit-diff-paint-whitespace-lines t + magit-diff-highlight-trailing t)) ;; --------------------------------- -- cgit v1.2.3 From 6b4b1b0a7ea21a3acb303a031f5128d7c437b96f Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Mon, 22 May 2023 00:28:22 -0400 Subject: Add `.cache/` to `.gitignore` --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b424c71..fa7a7f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ auto-save-list/ bookmarks +.cache/ eln-cache/ org-roam.db projectile.cache -- cgit v1.2.3 From 0c34d5369defb092d2cc77bd0de1abd5007ed4d7 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Mon, 22 May 2023 02:12:35 -0400 Subject: Use `flycheck` in `sh-mode` buffers --- init.el | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/init.el b/init.el index 4807df0..8d9152b 100644 --- a/init.el +++ b/init.el @@ -809,9 +809,11 @@ ;; a mistake. ;; --------------------------------- -;; Flycheck +;; Flycheck is activated by specific language modes. +;; See `:hook's in language modes below to see which ones use it. (use-package flycheck - :straight t) + :straight t + :defer t) ;; --------------------------------- @@ -838,6 +840,26 @@ :hook (emacs-lisp-mode . flycheck-mode)) +;; --------------------------------- +;; sh / Bash +;; ---------- +;; Scripts for POSIX Shell and Bash. +;; +;; NOTE: The first time you use this +;; configuration, you must run +;; `M-x lsp-install-server RET bash-ls RET' +;; --------------------------------- + +;; Configure sh-mode +(use-package sh-mode + :hook (sh-mode . flycheck-mode)) + +;; Configure LSP for sh / Bash +(use-package lsp-mode + :config + (setq lsp-bash-highlight-parsing-errors t)) + + ;; --------------------------------------------------------------------- -- cgit v1.2.3 From 5ac2db27f3d3982cd8ad15e70d5a2cb3bd9590df Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Mon, 22 May 2023 02:43:42 -0400 Subject: Use `sly` and SBCL for Common Lisp development --- init.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/init.el b/init.el index 8d9152b..b5a0bcf 100644 --- a/init.el +++ b/init.el @@ -839,6 +839,17 @@ :commands (emacs-lisp-mode) :hook (emacs-lisp-mode . flycheck-mode)) +;; --------------------------------- +;; Common Lisp +;; ----------- +;; The programmable language +;; --------------------------------- + +(use-package sly + :straight t + :config + (setq inferior-lisp-program "/usr/bin/sbcl")) + ;; --------------------------------- ;; sh / Bash -- cgit v1.2.3 From de4393799251ab00ebfc82d7012e62e4ec38e7d9 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Mon, 22 May 2023 02:44:37 -0400 Subject: Minor formatting fix --- init.el | 1 + 1 file changed, 1 insertion(+) diff --git a/init.el b/init.el index b5a0bcf..57aac67 100644 --- a/init.el +++ b/init.el @@ -839,6 +839,7 @@ :commands (emacs-lisp-mode) :hook (emacs-lisp-mode . flycheck-mode)) + ;; --------------------------------- ;; Common Lisp ;; ----------- -- cgit v1.2.3 From 3f61428a40cbcb42c2d014263f7abd1ba914d649 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Mon, 22 May 2023 11:20:34 -0400 Subject: Use `sly-quicklisp` for QuickLisp integration --- init.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.el b/init.el index 57aac67..c43a952 100644 --- a/init.el +++ b/init.el @@ -846,11 +846,16 @@ ;; The programmable language ;; --------------------------------- +;; Sly REPL (use-package sly :straight t :config (setq inferior-lisp-program "/usr/bin/sbcl")) +;; Quicklisp integration for Sly +(use-package sly-quicklisp + :straight t) + ;; --------------------------------- ;; sh / Bash -- cgit v1.2.3 From 2d9aa02a7941621cc3766424332b8b95cb4f35ea Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Mon, 22 May 2023 11:23:24 -0400 Subject: Fix `projectile-mode` hook --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index c43a952..a13b58b 100644 --- a/init.el +++ b/init.el @@ -467,7 +467,7 @@ (use-package projectile :straight t :config - (projectile-mode) + (add-hook 'after-init-hook 'projectile-global-mode) (setq projectile-project-search-path '("~/Projects") projectile-known-projects-file "~/.emacs.d/projectile-known-projects.eld" projectile-cache-file "~/.emacs.d/projectile.cache") -- cgit v1.2.3 From 7368f4b04f1754f907e524db7ce139af4a2c5a11 Mon Sep 17 00:00:00 2001 From: Mountain Man <43313373+MountainMan1312@users.noreply.github.com> Date: Mon, 22 May 2023 11:24:11 -0400 Subject: Limit `which-key` height to 5 lines to match `vertico` --- init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index a13b58b..72e8892 100644 --- a/init.el +++ b/init.el @@ -897,7 +897,8 @@ :straight t :init (which-key-mode) :config - (setq which-key-idle-delay 1.5)) + (setq which-key-idle-delay 1.5 + which-key-side-window-max-height 5)) ;; --------------------------------- -- cgit v1.2.3