Switch back to flymake, fun aesthetic changes, improve terminal eshell support via eat

This commit is contained in:
Curt Spark 2024-12-22 15:14:56 +00:00
parent 49898f5744
commit e76fc52eee
2 changed files with 304 additions and 163 deletions

View File

@ -243,9 +243,9 @@ Install the package, enable it and ensure that it always is installed:
**** Emacs Dashboard Configuration **** Emacs Dashboard Configuration
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;; Set the title ;; Set the title
(setq dashboard-banner-logo-title "Welcome to Curt Spark's Emacs!") (setq dashboard-banner-logo-title "The EMACS operating system.")
;; Set the banner ;; Set the banner
(setq dashboard-startup-banner '1) (setq dashboard-startup-banner '3)
;; Value can be ;; Value can be
;; 'official which displays the official emacs logo ;; 'official which displays the official emacs logo
;; 'logo which displays an alternative emacs logo ;; 'logo which displays an alternative emacs logo
@ -404,6 +404,27 @@ Zoxide Z like functionality, better cd inside eshell
:ensure t) :ensure t)
#+END_SRC #+END_SRC
*** Eat Terminal
Eat is a terminal emulator that can integrate nicely with eshell, allows us to run full ncurses applications inside eshell.
#+BEGIN_SRC emacs-lisp
(use-package eat
:straight '(eat :type git
:host codeberg
:repo "akib/emacs-eat"
:files ("*.el" ("term" "term/*.el") "*.texi"
"*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el")))
:ensure t
:init
;; For `eat-eshell-mode'.
(add-hook 'eshell-load-hook #'eat-eshell-mode)
;; For `eat-eshell-visual-command-mode'.
(add-hook 'eshell-load-hook #'eat-eshell-visual-command-mode)
)
#+END_SRC
** Default Shell ** Default Shell
Set the default shell used to run commands. Set the default shell used to run commands.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -1067,9 +1088,9 @@ The prettier Emacs package reformats your code by running Prettier with minimal
#+END_SRC #+END_SRC
** Flycheck ** Flycheck
Flycheck is a modern version of Flymake, provides error messages Flycheck is a modern version of Flymake, provides error messages. (Disabling, flycheck currently does not integrate with lsp-bridge. See https://github.com/flycheck/flycheck/issues/2094)
#+BEGIN_SRC emacs-lisp +BEGIN_SRC emacs-lisp
(use-package flycheck (use-package flycheck
:ensure t :ensure t
:config :config
@ -1077,12 +1098,24 @@ Flycheck is a modern version of Flymake, provides error messages
(add-hook 'prog-mode-hook #'flycheck-mode)) (add-hook 'prog-mode-hook #'flycheck-mode))
;; Display errors inline ;; Display errors inline
+END_SRC
*** Inline Errors
**** Flycheck Inline
+BEGIN_SRC emacs-lisp
(use-package flycheck-inline (use-package flycheck-inline
:after flycheck :after flycheck
:ensure t :ensure t
:config :config
(add-hook 'flycheck-mode-hook #'flycheck-inline-mode)) (add-hook 'flycheck-mode-hook #'flycheck-inline-mode))
#+END_SRC +END_SRC
**** Flycheck Posframe
+BEGIN_SRC emacs-lisp
(use-package flycheck-posframe
:after flycheck
:ensure t
:config
(add-hook 'flycheck-mode-hook #'flycheck-inline-mode))
+END_SRC
** LSP ** LSP
*** Eglot Mode *** Eglot Mode
Emacs Polyglot is the Emacs LSP client that stays out of your way, built into emacs. Emacs Polyglot is the Emacs LSP client that stays out of your way, built into emacs.
@ -1255,7 +1288,8 @@ LSP Bridge is meant to be a super fast LSP integration.
;;(setq lsp-bridge-remote-python-file "~/.emacs.d/straight/repos/lsp-bridge/lsp_bridge.py") ;;(setq lsp-bridge-remote-python-file "~/.emacs.d/straight/repos/lsp-bridge/lsp_bridge.py")
(setq lsp-bridge-remote-log "~/.emacs.d/lbr_log.txt") (setq lsp-bridge-remote-log "~/.emacs.d/lbr_log.txt")
(setq lsp-bridge-diagnostic-fetch-idle 2) (setq lsp-bridge-diagnostic-fetch-idle 0.5)
(setq lsp-bridge-diagnostic-overlays t)
(setq acm-enable-capf t) (setq acm-enable-capf t)
(setq acm-enable-icon t) (setq acm-enable-icon t)
@ -1272,6 +1306,94 @@ LSP Bridge is meant to be a super fast LSP integration.
(global-lsp-bridge-mode) (global-lsp-bridge-mode)
) )
#+END_SRC #+END_SRC
**** Flymake Integration
Integrate lsp-bridge with flymake to provide error messages.
#+BEGIN_SRC emacs-lisp
(use-package flymake-bridge
:ensure t
:straight '(flymake-bridge :type git :host github :repo "liuyinz/flymake-bridge")
:after (lsp-bridge flymake)
:hook ((prog-mode . flymake-mode)
;;(flymake-mode . flymake-bridge-setup)
(lsp-bridge-mode . flymake-bridge-setup))
:config
(setq flymake-start-on-save-buffer t)
(setq flymake-start-on-flymake-mode t)
(setq flymake-start-syntax-check-on-find-file t)
)
#+END_SRC
** Ranger
This is a minor mode that runs within dired, it emulates many of
ranger's (terminal file manager) features. This minor mode shows a
stack of parent directories, and updates the parent buffers, while
you're navigating the file system. The preview window takes some of
the ideas from Peep-Dired, to display previews for the selected files,
in the primary dired buffer.
#+BEGIN_SRC emacs-lisp
(use-package ranger
:ensure t)
#+END_SRC
** Libvterm
A better terminal
+BEGIN_SRC emacs-lisp
(use-package vterm
:ensure t)
+END_SRC
** Sudo Edit
Allows you to edit files as root via running sudo-edit
#+BEGIN_SRC emacs-lisp
(use-package sudo-edit
:ensure t)
#+END_SRC
** MPD
Clients that support MPD
*** MPDel
MPDel is an Emacs client for Music Player Daemon (MPD), a flexible, powerful, server-side application for playing music.
+BEGIN_SRC emacs-lisp
(use-package mpdel
:ensure t)
+END_SRC
*** Mingus
Mingus is a frontend for GNU Emacs to the Music Player daemon. The interface closely, though not strictly, resembles that of ncmpc.
#+BEGIN_SRC emacs-lisp
(use-package mingus
:ensure t
)
(with-eval-after-load 'mingus
(define-key mingus-playlist-mode-map (kbd "<XF86AudioRaiseVolume>") 'mingus-vol-up)
(define-key mingus-playlist-mode-map (kbd "<XF86AudioLowerVolume>") 'mingus-vol-down)
(define-key mingus-playlist-mode-map (kbd "C-s") 'mingus-query)
)
#+END_SRC
** Databases
*** Sqlite Mode
Emacs has a built in sqlite mode to view sqlite database files and modify them. Configure to be a bit nicer
#+BEGIN_SRC emacs-lisp
(with-eval-after-load 'sqlite-mode
(define-key sqlite-mode-map (kbd "<tab>") 'sqlite-mode-list-data)
)
;; Hook into find-file, basically allows us to open the sqlite db file directly instead of using sqlite-mode-open-file function
(defun sqlite-find-file-hook ()
(when (string= (file-name-extension buffer-file-name) "sqlite")
(let
(
(sql-original-buffer-name (buffer-name))
(sql-original-buffer-file-name (buffer-file-name))
)
(kill-buffer sql-original-buffer-name)
(sqlite-mode-open-file sql-original-buffer-file-name)
)
)
)
(add-hook 'find-file-hook 'sqlite-find-file-hook)
#+END_SRC
** Edwina Dynamic Tiling ** Edwina Dynamic Tiling
Edwina is a dynamic window manager for Emacs. It automatically arranges your Emacs panes (called “windows” in Emacs parlance) into predefined layouts, dwm-style. Edwina is a dynamic window manager for Emacs. It automatically arranges your Emacs panes (called “windows” in Emacs parlance) into predefined layouts, dwm-style.
@ -1298,10 +1420,10 @@ in the primary dired buffer.
#+END_SRC #+END_SRC
** Libvterm ** Libvterm
A better terminal A better terminal
#+BEGIN_SRC emacs-lisp +BEGIN_SRC emacs-lisp
(use-package vterm (use-package vterm
:ensure t) :ensure t)
#+END_SRC +END_SRC
** Sudo Edit ** Sudo Edit
Allows you to edit files as root via running sudo-edit Allows you to edit files as root via running sudo-edit
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -1381,7 +1503,6 @@ For more information on setup, you should check out `https://github.com/ch11ng/e
Install the package, enable it and ensure that it always is installed, and then configure: Install the package, enable it and ensure that it always is installed, and then configure:
*** EXWM *** EXWM
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(print "exwm reach")
(use-package exwm (use-package exwm
:ensure t :ensure t
:config :config
@ -1389,6 +1510,7 @@ Install the package, enable it and ensure that it always is installed, and then
#+END_SRC #+END_SRC
**** Configuration **** Configuration
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(with-eval-after-load 'exwm
;; Autostart applications ;; Autostart applications
(start-process-shell-command "udiskie" nil "udiskie") (start-process-shell-command "udiskie" nil "udiskie")
(start-process-shell-command "dunst" nil "dunst") (start-process-shell-command "dunst" nil "dunst")
@ -1414,26 +1536,38 @@ Install the package, enable it and ensure that it always is installed, and then
(defun exwm-switch-workspace-left () (defun exwm-switch-workspace-left ()
"Switch one workspace to the left" "Switch one workspace to the left"
(interactive) (interactive)
(if (= exwm-workspace-current-index 0) (exwm-workspace-switch 9) (exwm-workspace-switch (- exwm-workspace-current-index 1))) (if (= exwm-workspace-current-index 0)
(exwm-workspace-switch (- exwm-workspace-number 1))
(exwm-workspace-switch (- exwm-workspace-current-index 1))
)
(message (concat "Switched to workspace " (number-to-string exwm-workspace-current-index) "!"))) (message (concat "Switched to workspace " (number-to-string exwm-workspace-current-index) "!")))
(defun exwm-switch-workspace-right () (defun exwm-switch-workspace-right ()
"Switch one workspace to the right" "Switch one workspace to the right"
(interactive) (interactive)
(if (= exwm-workspace-current-index 9) (exwm-workspace-switch 0) (exwm-workspace-switch (+ exwm-workspace-current-index 1))) (if (= exwm-workspace-current-index (- exwm-workspace-number 1))
(exwm-workspace-switch 0)
(exwm-workspace-switch (+ exwm-workspace-current-index 1))
)
(message (concat "Switched to workspace " (number-to-string exwm-workspace-current-index) "!"))) (message (concat "Switched to workspace " (number-to-string exwm-workspace-current-index) "!")))
(defun exwm-swap-workspace-left () (defun exwm-swap-workspace-left ()
"Swap current workspace with the workspace to the left" "Swap current workspace with the workspace to the left"
(interactive) (interactive)
(if (= exwm-workspace-current-index 0) (exwm-workspace-swap exwm-workspace--current (exwm-workspace--workspace-from-frame-or-index 9)) (exwm-workspace-swap exwm-workspace--current (exwm-workspace--workspace-from-frame-or-index (- exwm-workspace-current-index 1)))) (if (= exwm-workspace-current-index 0)
(exwm-workspace-swap exwm-workspace--current (exwm-workspace--workspace-from-frame-or-index (- exwm-workspace-number 1)))
(exwm-workspace-swap exwm-workspace--current (exwm-workspace--workspace-from-frame-or-index (- exwm-workspace-current-index 1)))
)
(message (concat "Swapped current workspace with workspace " (number-to-string exwm-workspace-current-index) "!"))) (message (concat "Swapped current workspace with workspace " (number-to-string exwm-workspace-current-index) "!")))
(defun exwm-swap-workspace-right () (defun exwm-swap-workspace-right ()
"Swap current workspace with the workspace to the right" "Swap current workspace with the workspace to the right"
(interactive) (interactive)
(if (= exwm-workspace-current-index 9) (exwm-workspace-swap exwm-workspace--current (exwm-workspace--workspace-from-frame-or-index 0)) (exwm-workspace-swap exwm-workspace--current (exwm-workspace--workspace-from-frame-or-index (+ exwm-workspace-current-index 1))) ) (if (= exwm-workspace-current-index (- exwm-workspace-number 1))
(exwm-workspace-swap exwm-workspace--current (exwm-workspace--workspace-from-frame-or-index 0))
(exwm-workspace-swap exwm-workspace--current (exwm-workspace--workspace-from-frame-or-index (+ exwm-workspace-current-index 1)))
)
(message (concat "Swapped current workspace with workspace " (number-to-string exwm-workspace-current-index) "!"))) (message (concat "Swapped current workspace with workspace " (number-to-string exwm-workspace-current-index) "!")))
;; Rename EXWM buffers with window title so they are all identifiable/unique ;; Rename EXWM buffers with window title so they are all identifiable/unique
@ -1551,6 +1685,7 @@ Install the package, enable it and ensure that it always is installed, and then
;; Ido mode seems to be enabled in the default configuration, turn it back off as we are using Ivy completion instead. ;; Ido mode seems to be enabled in the default configuration, turn it back off as we are using Ivy completion instead.
(ido-mode -1) (ido-mode -1)
)
#+END_SRC #+END_SRC

82
init.el
View File

@ -40,62 +40,68 @@
;; Your init file should contain only one such instance. ;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(ansi-color-names-vector '(ansi-color-names-vector
["#d2ceda" "#f2241f" "#67b11d" "#b1951d" "#3a81c3" "#a31db1" "#21b8c7" "#655370"]) ["#d2ceda" "#f2241f" "#67b11d" "#b1951d" "#3a81c3" "#a31db1" "#21b8c7"
"#655370"])
'(auth-source-save-behavior nil) '(auth-source-save-behavior nil)
'(custom-safe-themes '(custom-safe-themes
'("014cb63097fc7dbda3edf53eb09802237961cbb4c9e9abd705f23b86511b0a69" "38c0c668d8ac3841cb9608522ca116067177c92feeabc6f002a27249976d7434" "f4d1b183465f2d29b7a2e9dbe87ccc20598e79738e5d29fc52ec8fb8c576fcfd" "e3daa8f18440301f3e54f2093fe15f4fe951986a8628e98dcd781efbec7a46f2" "691d671429fa6c6d73098fc6ff05d4a14a323ea0a18787daeb93fde0e48ab18b" "7546a14373f1f2da6896830e7a73674ef274b3da313f8a2c4a79842e8a93953e" "d6603a129c32b716b3d3541fc0b6bfe83d0e07f1954ee64517aa62c9405a3441" "8f5a7a9a3c510ef9cbb88e600c0b4c53cdcdb502cfe3eb50040b7e13c6f4e78e" "ba72dfc6bb260a9d8609136b9166e04ad0292b9760a3e2431cf0cd0679f83c3a" "e1ecb0536abec692b5a5e845067d75273fe36f24d01210bf0aa5842f2a7e029f" "be9645aaa8c11f76a10bcf36aaf83f54f4587ced1b9b679b55639c87404e2499" "8a379e7ac3a57e64de672dd744d4730b3bdb88ae328e8106f95cd81cbd44e0b6" "41098e2f8fa67dc51bbe89cce4fb7109f53a164e3a92356964c72f76d068587e" "bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" "fa2b58bb98b62c3b8cf3b6f02f058ef7827a8e497125de0254f56e373abee088" "2035a16494e06636134de6d572ec47c30e26c3447eafeb6d3a9e8aee73732396" "86704574d397606ee1433af037c46611fb0a2787e8b6fd1d6c96361575be72d2" "a41b81af6336bd822137d4341f7e16495a49b06c180d6a6417bf9fd1001b6d2b" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" default)) '("014cb63097fc7dbda3edf53eb09802237961cbb4c9e9abd705f23b86511b0a69"
"38c0c668d8ac3841cb9608522ca116067177c92feeabc6f002a27249976d7434"
"f4d1b183465f2d29b7a2e9dbe87ccc20598e79738e5d29fc52ec8fb8c576fcfd"
"e3daa8f18440301f3e54f2093fe15f4fe951986a8628e98dcd781efbec7a46f2"
"691d671429fa6c6d73098fc6ff05d4a14a323ea0a18787daeb93fde0e48ab18b"
"7546a14373f1f2da6896830e7a73674ef274b3da313f8a2c4a79842e8a93953e"
"d6603a129c32b716b3d3541fc0b6bfe83d0e07f1954ee64517aa62c9405a3441"
"8f5a7a9a3c510ef9cbb88e600c0b4c53cdcdb502cfe3eb50040b7e13c6f4e78e"
"ba72dfc6bb260a9d8609136b9166e04ad0292b9760a3e2431cf0cd0679f83c3a"
"e1ecb0536abec692b5a5e845067d75273fe36f24d01210bf0aa5842f2a7e029f"
"be9645aaa8c11f76a10bcf36aaf83f54f4587ced1b9b679b55639c87404e2499"
"8a379e7ac3a57e64de672dd744d4730b3bdb88ae328e8106f95cd81cbd44e0b6"
"41098e2f8fa67dc51bbe89cce4fb7109f53a164e3a92356964c72f76d068587e"
"bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476"
"fa2b58bb98b62c3b8cf3b6f02f058ef7827a8e497125de0254f56e373abee088"
"2035a16494e06636134de6d572ec47c30e26c3447eafeb6d3a9e8aee73732396"
"86704574d397606ee1433af037c46611fb0a2787e8b6fd1d6c96361575be72d2"
"a41b81af6336bd822137d4341f7e16495a49b06c180d6a6417bf9fd1001b6d2b"
"3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa"
default))
'(dap-gdb-lldb-extension-version "0.27.0") '(dap-gdb-lldb-extension-version "0.27.0")
'(dap-lldb-debug-program '("/run/current-system/sw/bin/lldb-dap")) '(dap-lldb-debug-program '("/run/current-system/sw/bin/lldb-dap"))
'(elcord-boring-buffers-regexp-list '(elcord-boring-buffers-regexp-list
'("^ " "\\\\*Messages\\\\*" "\\\\*librewolf\\\\*" "\\\\*vesktop*\\\\*" "\\\\*telegram*\\\\")) '("^ " "\\\\*Messages\\\\*" "\\\\*librewolf\\\\*" "\\\\*vesktop*\\\\*"
"\\\\*telegram*\\\\"))
'(elcord-mode t nil (elcord)) '(elcord-mode t nil (elcord))
'(elcord-quiet 1) '(elcord-quiet 1)
'(fci-rule-color "#a28c6f") '(fci-rule-color "#a28c6f")
'(hl-todo-keyword-faces '(hl-todo-keyword-faces
'(("TODO" . "#dc752f") '(("TODO" . "#dc752f") ("NEXT" . "#dc752f") ("THEM" . "#2d9574")
("NEXT" . "#dc752f") ("PROG" . "#3a81c3") ("OKAY" . "#3a81c3") ("DONT" . "#f2241f")
("THEM" . "#2d9574") ("FAIL" . "#f2241f") ("DONE" . "#42ae2c") ("NOTE" . "#b1951d")
("PROG" . "#3a81c3") ("KLUDGE" . "#b1951d") ("HACK" . "#b1951d") ("TEMP" . "#b1951d")
("OKAY" . "#3a81c3") ("FIXME" . "#dc752f") ("XXX+" . "#dc752f")
("DONT" . "#f2241f")
("FAIL" . "#f2241f")
("DONE" . "#42ae2c")
("NOTE" . "#b1951d")
("KLUDGE" . "#b1951d")
("HACK" . "#b1951d")
("TEMP" . "#b1951d")
("FIXME" . "#dc752f")
("XXX+" . "#dc752f")
("\\?\\?\\?+" . "#dc752f"))) ("\\?\\?\\?+" . "#dc752f")))
'(jdee-db-active-breakpoint-face-colors (cons "#030100" "#A76A19")) '(jdee-db-active-breakpoint-face-colors (cons "#030100" "#A76A19"))
'(jdee-db-requested-breakpoint-face-colors (cons "#030100" "#813c07")) '(jdee-db-requested-breakpoint-face-colors (cons "#030100" "#813c07"))
'(jdee-db-spec-breakpoint-face-colors (cons "#030100" "#100e0d")) '(jdee-db-spec-breakpoint-face-colors (cons "#030100" "#100e0d"))
'(objed-cursor-color "#874804") '(objed-cursor-color "#874804")
'(package-selected-packages '(package-selected-packages
'(ivy-pass lsp-sourcekit ranger omnisharp csharp-mode bug-hunter ewal-doom-themes ewal-evil-cursors ewal-spacemacs-themes ewal org-bullets company flyspell-correct-ivy evil ivy which-key use-package)) '(ivy-pass lsp-sourcekit ranger omnisharp csharp-mode bug-hunter
ewal-doom-themes ewal-evil-cursors ewal-spacemacs-themes
ewal org-bullets company flyspell-correct-ivy evil ivy
which-key use-package))
'(rustic-ansi-faces '(rustic-ansi-faces
["#040201" "#874804" "#813c07" "#a45101" "#A76A19" "#D76C03" "#F09010" "#e8c99f"]) ["#040201" "#874804" "#813c07" "#a45101" "#A76A19" "#D76C03" "#F09010"
"#e8c99f"])
'(swift-mode:basic-offset 8)
'(vc-annotate-background "#040201") '(vc-annotate-background "#040201")
'(vc-annotate-color-map '(vc-annotate-color-map
(list (list (cons 20 "#813c07") (cons 40 "#8c4305") (cons 60 "#984903")
(cons 20 "#813c07") (cons 80 "#a45101") (cons 100 "#9d4f02") (cons 120 "#964d03")
(cons 40 "#8c4305") (cons 140 "#8F4C05") (cons 160 "#a75604")
(cons 60 "#984903") (cons 180 "#bf6103") (cons 200 "#D76C03")
(cons 80 "#a45101") (cons 220 "#bc6003") (cons 240 "#a15403")
(cons 100 "#9d4f02") (cons 260 "#874804") (cons 280 "#693906")
(cons 120 "#964d03") (cons 300 "#4b2b08") (cons 320 "#2d1c0a")
(cons 140 "#8F4C05") (cons 340 "#a28c6f") (cons 360 "#a28c6f")))
(cons 160 "#a75604")
(cons 180 "#bf6103")
(cons 200 "#D76C03")
(cons 220 "#bc6003")
(cons 240 "#a15403")
(cons 260 "#874804")
(cons 280 "#693906")
(cons 300 "#4b2b08")
(cons 320 "#2d1c0a")
(cons 340 "#a28c6f")
(cons 360 "#a28c6f")))
'(vc-annotate-very-old-color nil)) '(vc-annotate-very-old-color nil))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.