Compare commits
2 Commits
11be880883
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79e0e7e405
|
||
| 3720739ca2 |
364
README.org
364
README.org
@@ -218,8 +218,9 @@ Magic Hack) to handle this. It seems to work pretty well.
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; Garbage collection
|
;; Garbage collection
|
||||||
(use-package gcmh
|
(use-package gcmh
|
||||||
:ensure t
|
:demand t
|
||||||
:hook (after-init . gcmh-mode)
|
:init
|
||||||
|
(gcmh-mode)
|
||||||
:custom
|
:custom
|
||||||
(gcmh-idle-delay 'auto)
|
(gcmh-idle-delay 'auto)
|
||||||
(gcmh-auto-idle-delay-factor 10))
|
(gcmh-auto-idle-delay-factor 10))
|
||||||
@@ -383,18 +384,25 @@ There are a lot of solutions for editing files, and projects remotely. At the m
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-feature tramp
|
(use-feature tramp
|
||||||
:config
|
:config
|
||||||
|
(setq tramp-ssh-controlmaster-options
|
||||||
|
(concat
|
||||||
|
"-o ControlPath=/tmp/ssh-ControlPath-%%r@%%h:%%p "
|
||||||
|
"-o ControlMaster=auto -o ControlPersist=yes"))
|
||||||
;; Enable full-featured Dirvish over TRAMP on ssh connections
|
;; Enable full-featured Dirvish over TRAMP on ssh connections
|
||||||
;; https://www.gnu.org/software/tramp/#Improving-performance-of-asynchronous-remote-processes
|
;; https://www.gnu.org/software/tramp/#Improving-performance-of-asynchronous-remote-processes
|
||||||
(connection-local-set-profile-variables
|
(connection-local-set-profile-variables
|
||||||
'remote-direct-async-process
|
'remote-direct-async-process
|
||||||
'((tramp-direct-async-process . t)))
|
'((tramp-direct-async-process . t)))
|
||||||
(connection-local-set-profiles
|
(connection-local-set-profiles
|
||||||
'(:application tramp :protocol "ssh")
|
'(:application tramp :protocol "rsync")
|
||||||
'remote-direct-async-process)
|
'remote-direct-async-process)
|
||||||
|
(setq magit-tramp-pipe-stty-settings 'pty)
|
||||||
|
(with-eval-after-load 'compile
|
||||||
|
(remove-hook 'compilation-mode-hook #'tramp-compile-disable-ssh-controlmaster-options))
|
||||||
;; Tips to speed up connections
|
;; Tips to speed up connections
|
||||||
(setq tramp-verbose 0)
|
(setq tramp-verbose 0)
|
||||||
(setq tramp-chunksize 2000)
|
(setq tramp-chunksize 2000)
|
||||||
(setq tramp-ssh-controlmaster-options nil))
|
(setq tramp-copy-size-limit nil))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Blocks, Parentheses and Formatting Oh My!
|
* Blocks, Parentheses and Formatting Oh My!
|
||||||
@@ -803,213 +811,132 @@ _SPC_ cancel _o_nly this _d_elete
|
|||||||
<<window-hydra>>)
|
<<window-hydra>>)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Buferlo
|
# #+INCLUDE: "config/bufferlo.org" :minlevel 1
|
||||||
|
* IBuffer
|
||||||
|
|
||||||
The package itself sums it up best.
|
Buffer management is a constant irritation with any editor. After
|
||||||
|
having a bit of a performance issue when using [[https://github.com/florommel/bufferlo][bufferlo]] I've decided
|
||||||
|
to try doing something with emacs's built in IBuffer.
|
||||||
|
|
||||||
#+begin_quote
|
This is *heavily* inspired, and mostly outright copied from this [[https://olddeuteronomy.github.io/post/emacs-ibuffer-config/][post]]
|
||||||
Easy-to-use buffer management and workspace persistence tools for Emacs workflow management.
|
by [[https://olddeuteronomy.github.io][The Emacs Cat]].
|
||||||
Headbutt your way to productivity and moove ahead with [[https://github.com/florommel/bufferlo][bufferlo]].
|
|
||||||
#+end_quote
|
|
||||||
|
|
||||||
This is great for keeping tabs seperate.
|
Icons can make identifying buffers easy at a glance so I think adding
|
||||||
|
them is pretty handy.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; Bufferlo package configuration
|
(use-package all-the-icons-ibuffer
|
||||||
(use-package bufferlo
|
|
||||||
:ensure t
|
:ensure t
|
||||||
:demand t
|
:after (all-the-icons)
|
||||||
:after (consult orderless)
|
:hook
|
||||||
|
(ibuffer-mode . all-the-icons-ibuffer-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Now for the main part of the configuration. This provides a nice
|
||||||
|
logical grouping for buffers. As I use this more I might change
|
||||||
|
the grouping to be a bit less file type oriented, and lean more
|
||||||
|
towards use case.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package ibuffer :ensure nil
|
||||||
:bind
|
:bind
|
||||||
;; Main transient menu binding
|
(("C-x B" . ibuffer))
|
||||||
(("C-x B" . bufferlo-transient)) ; Capital B to avoid conflict with switch-to-buffer
|
|
||||||
|
|
||||||
:init
|
|
||||||
;; These must be set before bufferlo is loaded
|
|
||||||
(setq bufferlo-menu-bar-show t)
|
|
||||||
(setq bufferlo-menu-bar-list-buffers 'ibuffer)
|
|
||||||
(setq bufferlo-prefer-local-buffers 'tabs)
|
|
||||||
(setq bufferlo-ibuffer-bind-local-buffer-filter t)
|
|
||||||
(setq bufferlo-ibuffer-bind-keys t)
|
|
||||||
|
|
||||||
:config
|
:config
|
||||||
;; Enable bufferlo mode
|
(setq ibuffer-expert t)
|
||||||
(bufferlo-mode 1)
|
(setq ibuffer-display-summary nil)
|
||||||
|
(setq ibuffer-use-other-window nil)
|
||||||
;; Optional: Enable bufferlo-anywhere mode for local buffer lists everywhere
|
(setq ibuffer-show-empty-filter-groups nil)
|
||||||
(bufferlo-anywhere-mode 1)
|
(setq ibuffer-default-sorting-mode 'filename/process)
|
||||||
|
(setq ibuffer-title-face 'font-lock-doc-face)
|
||||||
;; Mode-line configuration
|
(setq ibuffer-use-header-line t)
|
||||||
(setq bufferlo-mode-line-prefix "🐃")
|
(setq ibuffer-default-shrink-to-minimum-size nil)
|
||||||
(setq bufferlo-mode-line-set-active-prefix "Ⓢ")
|
(setq ibuffer-formats
|
||||||
(setq bufferlo-mode-line-frame-prefix "Ⓕ")
|
'((mark modified read-only locked " "
|
||||||
(setq bufferlo-mode-line-tab-prefix "Ⓣ")
|
(name 30 30 :left :elide)
|
||||||
(setq bufferlo-mode-line-left-prefix nil)
|
" "
|
||||||
(setq bufferlo-mode-line-right-suffix nil)
|
(size 9 -1 :right)
|
||||||
|
" "
|
||||||
;; Buffer management policies
|
(mode 16 16 :left :elide)
|
||||||
(setq bufferlo-kill-buffers-prompt t)
|
" " filename-and-process)
|
||||||
(setq bufferlo-kill-modified-buffers-policy 'retain-modified-kill-without-file-name)
|
(mark " "
|
||||||
(setq bufferlo-delete-frame-kill-buffers-prompt t)
|
(name 16 -1)
|
||||||
(setq bufferlo-close-tab-kill-buffers-prompt t)
|
" " filename)))
|
||||||
|
(setq ibuffer-saved-filter-groups
|
||||||
;; Bookmark configuration
|
'(("Main"
|
||||||
(setq bufferlo-bookmark-frame-save-on-delete 'when-bookmarked)
|
("Directories" (mode . dired-mode))
|
||||||
(setq bufferlo-bookmark-tab-save-on-close 'when-bookmarked)
|
("C++" (or
|
||||||
(setq bufferlo-bookmark-frame-load-make-frame 'restore-geometry)
|
(mode . c++-mode)
|
||||||
(setq bufferlo-bookmark-frame-load-policy 'prompt)
|
(mode . c++-ts-mode)
|
||||||
(setq bufferlo-bookmark-frame-duplicate-policy 'prompt)
|
(mode . c-mode)
|
||||||
(setq bufferlo-bookmark-tab-replace-policy 'new)
|
(mode . c-ts-mode)
|
||||||
(setq bufferlo-bookmark-tab-duplicate-policy 'prompt)
|
(mode . c-or-c++-ts-mode)))
|
||||||
(setq bufferlo-bookmarks-save-duplicates-policy 'prompt)
|
("Python" (or
|
||||||
|
(mode . python-ts-mode)
|
||||||
;; Auto-save configuration (optional - adjust interval as needed)
|
(mode . c-mode)
|
||||||
(setopt bufferlo-bookmarks-auto-save-interval (* 60 5)) ; 5 minutes
|
(mode . python-mode)))
|
||||||
(setq bufferlo-bookmarks-auto-save-messages 'saved)
|
("Build" (or
|
||||||
|
(mode . make-mode)
|
||||||
;; Filter configuration for bookmark saving
|
(mode . makefile-gmake-mode)
|
||||||
(setq bufferlo-bookmark-buffers-exclude-filters
|
(name . "^Makefile$")
|
||||||
(list
|
(mode . change-log-mode)))
|
||||||
(rx bos " " (1+ anything)) ; ignores "invisible" buffers
|
("Scripts" (or
|
||||||
(rx bos "*" (1+ anything) "*"))) ; ignores "special" buffers
|
(mode . shell-script-mode)
|
||||||
|
(mode . shell-mode)
|
||||||
(setq bufferlo-bookmark-buffers-include-filters
|
(mode . sh-mode)
|
||||||
(list
|
(mode . lua-mode)
|
||||||
(rx bos "*shell*")
|
(mode . bat-mode)))
|
||||||
(rx bos "*" (1+ anything) "-shell*")
|
("Config" (or
|
||||||
(rx bos "*eshell*")
|
(mode . conf-mode)
|
||||||
(rx bos "*" (1+ anything) "-eshell*")))
|
(mode . conf-toml-mode)
|
||||||
|
(mode . toml-ts-mode)
|
||||||
;; New tabs start with scratch buffer
|
(mode . conf-windows-mode)
|
||||||
(setq tab-bar-new-tab-choice "*scratch*")
|
(name . "^\\.clangd$")
|
||||||
|
(name . "^\\.gitignore$")
|
||||||
;; New frames start with scratch buffer
|
(name . "^Doxyfile$")
|
||||||
(add-hook 'after-make-frame-functions #'bufferlo-switch-to-scratch-buffer)
|
(name . "^config\\.toml$")
|
||||||
|
(mode . yaml-mode)))
|
||||||
;; Consult integration
|
("Web" (or
|
||||||
(defvar my:bufferlo-consult--source-local-buffers
|
(mode . mhtml-mode)
|
||||||
(list :name "Bufferlo Local Buffers"
|
(mode . html-mode)
|
||||||
:narrow ?l
|
(mode . web-mode)
|
||||||
:category 'buffer
|
(mode . nxml-mode)))
|
||||||
:face 'consult-buffer
|
("CSS" (or
|
||||||
:history 'buffer-name-history
|
(mode . css-mode)
|
||||||
:state #'consult--buffer-state
|
(mode . sass-mode)))
|
||||||
:default t
|
("JS" (or
|
||||||
:items (lambda () (consult--buffer-query
|
(mode . js-mode)
|
||||||
:predicate #'bufferlo-local-buffer-p
|
(mode . rjsx-mode)))
|
||||||
:sort 'visibility
|
("Markup" (or
|
||||||
:as #'buffer-name)))
|
(mode . markdown-mode)
|
||||||
"Local Bufferlo buffer candidate source for `consult-buffer'.")
|
(mode . adoc-mode)))
|
||||||
|
("Org" (mode . org-mode))
|
||||||
(defvar my:bufferlo-consult--source-other-buffers
|
("LaTeX" (name . "\.tex$"))
|
||||||
(list :name "Bufferlo Other Buffers"
|
("Magit" (or
|
||||||
:narrow ?o
|
(mode . magit-blame-mode)
|
||||||
:category 'buffer
|
(mode . magit-cherry-mode)
|
||||||
:face 'consult-buffer
|
(mode . magit-diff-mode)
|
||||||
:history 'buffer-name-history
|
(mode . magit-log-mode)
|
||||||
:state #'consult--buffer-state
|
(mode . magit-process-mode)
|
||||||
:items (lambda () (consult--buffer-query
|
(mode . magit-status-mode)))
|
||||||
:predicate #'bufferlo-non-local-buffer-p
|
("Apps" (or
|
||||||
:sort 'visibility
|
(mode . elfeed-search-mode)
|
||||||
:as #'buffer-name)))
|
(mode . elfeed-show-mode)))
|
||||||
"Non-local Bufferlo buffer candidate source for `consult-buffer'.")
|
("Fundamental" (or
|
||||||
|
(mode . fundamental-mode)
|
||||||
(defvar my:bufferlo-consult--source-all-buffers
|
(mode . text-mode)))
|
||||||
(list :name "Bufferlo All Buffers"
|
("Emacs" (or
|
||||||
:narrow ?a
|
(mode . emacs-lisp-mode)
|
||||||
:hidden t
|
(name . "^\\*Help\\*$")
|
||||||
:category 'buffer
|
(name . "^\\*Custom.*")
|
||||||
:face 'consult-buffer
|
(name . "^\\*Org Agenda\\*$")
|
||||||
:history 'buffer-name-history
|
(name . "^\\*info\\*$")
|
||||||
:state #'consult--buffer-state
|
(name . "^\\*scratch\\*$")
|
||||||
:items (lambda () (consult--buffer-query
|
(name . "^\\*Backtrace\\*$")
|
||||||
:sort 'visibility
|
(name . "^\\*Messages\\*$"))))))
|
||||||
:as #'buffer-name)))
|
:hook
|
||||||
"All Bufferlo buffer candidate source for `consult-buffer'.")
|
(ibuffer-mode . (lambda ()
|
||||||
|
(ibuffer-switch-to-saved-filter-groups "Main")))
|
||||||
;; Add consult sources in reverse order of display preference
|
)
|
||||||
(add-to-list 'consult-buffer-sources 'my:bufferlo-consult--source-all-buffers)
|
|
||||||
(add-to-list 'consult-buffer-sources 'my:bufferlo-consult--source-other-buffers)
|
|
||||||
(add-to-list 'consult-buffer-sources 'my:bufferlo-consult--source-local-buffers))
|
|
||||||
|
|
||||||
;; Transient menu for bufferlo
|
|
||||||
(use-package transient
|
|
||||||
:ensure t
|
|
||||||
:after bufferlo
|
|
||||||
:config
|
|
||||||
(transient-define-prefix bufferlo-transient ()
|
|
||||||
"Bufferlo management menu."
|
|
||||||
["Buffer Management"
|
|
||||||
["Local Buffers"
|
|
||||||
("b" "Switch to buffer" bufferlo-switch-to-buffer)
|
|
||||||
("B" "List buffers" bufferlo-list-buffers)
|
|
||||||
("i" "Ibuffer (local)" bufferlo-ibuffer)]
|
|
||||||
["Buffer Operations"
|
|
||||||
("c" "Clear local list" bufferlo-clear)
|
|
||||||
("r" "Remove buffer" bufferlo-remove)
|
|
||||||
("k" "Kill local buffers" bufferlo-kill-buffers)
|
|
||||||
("K" "Kill orphan buffers" bufferlo-kill-orphan-buffers)]]
|
|
||||||
|
|
||||||
["Bookmarks"
|
|
||||||
["Frame Bookmarks"
|
|
||||||
("fs" "Save frame" bufferlo-bookmark-frame-save)
|
|
||||||
("fu" "Update frame" bufferlo-bookmark-frame-save-current)
|
|
||||||
("fl" "Load frame" bufferlo-bookmark-frame-load)
|
|
||||||
("fr" "Reload frame" bufferlo-bookmark-frame-load-current)
|
|
||||||
("fm" "Merge frame" bufferlo-bookmark-frame-load-merge)]
|
|
||||||
["Tab Bookmarks"
|
|
||||||
("ts" "Save tab" bufferlo-bookmark-tab-save)
|
|
||||||
("tu" "Update tab" bufferlo-bookmark-tab-save-current)
|
|
||||||
("tl" "Load tab" bufferlo-bookmark-tab-load)
|
|
||||||
("tr" "Reload tab" bufferlo-bookmark-tab-load-current)]]
|
|
||||||
|
|
||||||
["Bookmark Sets & Management"
|
|
||||||
["Sets"
|
|
||||||
("ss" "Save set" bufferlo-set-save-interactive)
|
|
||||||
("su" "Update set" bufferlo-set-save-current-interactive)
|
|
||||||
("sl" "Load set" bufferlo-set-load-interactive)
|
|
||||||
("sc" "Close set" bufferlo-set-close-interactive)
|
|
||||||
("sC" "Clear set" bufferlo-set-clear-interactive)
|
|
||||||
("sL" "List sets" bufferlo-set-list-interactive)]
|
|
||||||
["General"
|
|
||||||
("L" "Load bookmarks" bufferlo-bookmarks-load-interactive)
|
|
||||||
("S" "Save bookmarks" bufferlo-bookmarks-save-interactive)
|
|
||||||
("C" "Close bookmarks" bufferlo-bookmarks-close-interactive)
|
|
||||||
("R" "Raise bookmark" bufferlo-bookmark-raise)]]
|
|
||||||
|
|
||||||
["Navigation & Utilities"
|
|
||||||
["Navigation"
|
|
||||||
("/" "Find buffer" bufferlo-find-buffer)
|
|
||||||
("." "Find & switch" bufferlo-find-buffer-switch)
|
|
||||||
("o" "List orphans" bufferlo-list-orphan-buffers)
|
|
||||||
("O" "Ibuffer orphans" bufferlo-ibuffer-orphans)]
|
|
||||||
["Project"
|
|
||||||
("p" "Isolate project" bufferlo-isolate-project)]
|
|
||||||
["Frame/Tab Operations"
|
|
||||||
("d" "Delete frame & kill buffers" bufferlo-delete-frame-kill-buffers)
|
|
||||||
("x" "Close tab & kill buffers" bufferlo-tab-close-kill-buffers)]]
|
|
||||||
|
|
||||||
["Quick Actions"
|
|
||||||
("q" "Quit" transient-quit-one)
|
|
||||||
("<escape>" "Quit" transient-quit-one)]))
|
|
||||||
|
|
||||||
;; Optional: Additional helper functions for common workflows
|
|
||||||
(defun my/bufferlo-switch-project ()
|
|
||||||
"Switch to a project and isolate its buffers."
|
|
||||||
(interactive)
|
|
||||||
(call-interactively 'project-switch-project)
|
|
||||||
(bufferlo-isolate-project))
|
|
||||||
|
|
||||||
(defun my/bufferlo-new-workspace (name)
|
|
||||||
"Create a new tab with a specific bookmark name."
|
|
||||||
(interactive "sWorkspace name: ")
|
|
||||||
(tab-bar-new-tab)
|
|
||||||
(bufferlo-bookmark-tab-save name))
|
|
||||||
|
|
||||||
(defun my/bufferlo-switch-workspace ()
|
|
||||||
"Switch to a saved workspace (tab bookmark)."
|
|
||||||
(interactive)
|
|
||||||
(call-interactively 'bufferlo-bookmark-tab-load))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Error Checking
|
* Error Checking
|
||||||
@@ -1296,7 +1223,7 @@ certain dependencies. It will function without them however.
|
|||||||
("d" "~/Downloads/" "Downloads")
|
("d" "~/Downloads/" "Downloads")
|
||||||
("s" "/ssh:192.168.88.1" "SSH server")))
|
("s" "/ssh:192.168.88.1" "SSH server")))
|
||||||
:config
|
:config
|
||||||
(dirvish-peek-mode) ; Preview files in minibuffer
|
;;(dirvish-peek-mode) ; Preview files in minibuffer
|
||||||
(dirvish-side-follow-mode) ; similar to `treemacs-follow-mode'
|
(dirvish-side-follow-mode) ; similar to `treemacs-follow-mode'
|
||||||
(setq dirvish-mode-line-format
|
(setq dirvish-mode-line-format
|
||||||
'(:left (sort symlink) :right (omit yank index)))
|
'(:left (sort symlink) :right (omit yank index)))
|
||||||
@@ -1440,6 +1367,24 @@ well.
|
|||||||
Many of these settings are there to reduce flickering. They may not be needed
|
Many of these settings are there to reduce flickering. They may not be needed
|
||||||
long term.
|
long term.
|
||||||
|
|
||||||
|
** Eshell
|
||||||
|
|
||||||
|
I eshell quite often. Here are some plugins that can add some missing functionality
|
||||||
|
beyond what eat-shell-mode gives.
|
||||||
|
|
||||||
|
*** eshell-venv
|
||||||
|
|
||||||
|
[[https://git.sr.ht/~struanr/eshell-venv][Eshell-venv]] is an Emacs package providing functions for activating and deactivating
|
||||||
|
Python virtual environments in Eshell.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package eshell-venv
|
||||||
|
:ensure
|
||||||
|
(:repo "https://git.sr.ht/~struanr/eshell-venv")
|
||||||
|
:hook
|
||||||
|
(eshell-mode . eshell-venv-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Look and Feel
|
* Look and Feel
|
||||||
|
|
||||||
I've already touched on some appearance settings so far, but I feel themes and
|
I've already touched on some appearance settings so far, but I feel themes and
|
||||||
@@ -1465,6 +1410,17 @@ I like using catppuccin from time to time as well.
|
|||||||
(use-package catppuccin-theme :ensure t)
|
(use-package catppuccin-theme :ensure t)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* Icons
|
||||||
|
|
||||||
|
Some Icons might spruce things up a bit. Might as well try to have
|
||||||
|
[[https://github.com/domtronn/all-the-icons.el][all the icons]]!
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package all-the-icons
|
||||||
|
:ensure t
|
||||||
|
:if (display-graphic-p))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Modeline
|
** Modeline
|
||||||
|
|
||||||
Doom emacs has a great modeline in my opinion so I'm using theirs almost
|
Doom emacs has a great modeline in my opinion so I'm using theirs almost
|
||||||
|
|||||||
@@ -221,7 +221,8 @@ features.
|
|||||||
|
|
||||||
#+INCLUDE: "config/hydra.org" :minlevel 1
|
#+INCLUDE: "config/hydra.org" :minlevel 1
|
||||||
|
|
||||||
#+INCLUDE: "config/bufferlo.org" :minlevel 1
|
# #+INCLUDE: "config/bufferlo.org" :minlevel 1
|
||||||
|
#+INCLUDE: "config/ibuffer.org" :minlevel 1
|
||||||
|
|
||||||
#+INCLUDE: "config/error.org" :minlevel 1
|
#+INCLUDE: "config/error.org" :minlevel 1
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ certain dependencies. It will function without them however.
|
|||||||
("d" "~/Downloads/" "Downloads")
|
("d" "~/Downloads/" "Downloads")
|
||||||
("s" "/ssh:192.168.88.1" "SSH server")))
|
("s" "/ssh:192.168.88.1" "SSH server")))
|
||||||
:config
|
:config
|
||||||
(dirvish-peek-mode) ; Preview files in minibuffer
|
;;(dirvish-peek-mode) ; Preview files in minibuffer
|
||||||
(dirvish-side-follow-mode) ; similar to `treemacs-follow-mode'
|
(dirvish-side-follow-mode) ; similar to `treemacs-follow-mode'
|
||||||
(setq dirvish-mode-line-format
|
(setq dirvish-mode-line-format
|
||||||
'(:left (sort symlink) :right (omit yank index)))
|
'(:left (sort symlink) :right (omit yank index)))
|
||||||
|
|||||||
@@ -9,8 +9,9 @@ Magic Hack) to handle this. It seems to work pretty well.
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; Garbage collection
|
;; Garbage collection
|
||||||
(use-package gcmh
|
(use-package gcmh
|
||||||
:ensure t
|
:demand t
|
||||||
:hook (after-init . gcmh-mode)
|
:init
|
||||||
|
(gcmh-mode)
|
||||||
:custom
|
:custom
|
||||||
(gcmh-idle-delay 'auto)
|
(gcmh-idle-delay 'auto)
|
||||||
(gcmh-auto-idle-delay-factor 10))
|
(gcmh-auto-idle-delay-factor 10))
|
||||||
|
|||||||
@@ -100,16 +100,23 @@ There are a lot of solutions for editing files, and projects remotely. At the m
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-feature tramp
|
(use-feature tramp
|
||||||
:config
|
:config
|
||||||
|
(setq tramp-ssh-controlmaster-options
|
||||||
|
(concat
|
||||||
|
"-o ControlPath=/tmp/ssh-ControlPath-%%r@%%h:%%p "
|
||||||
|
"-o ControlMaster=auto -o ControlPersist=yes"))
|
||||||
;; Enable full-featured Dirvish over TRAMP on ssh connections
|
;; Enable full-featured Dirvish over TRAMP on ssh connections
|
||||||
;; https://www.gnu.org/software/tramp/#Improving-performance-of-asynchronous-remote-processes
|
;; https://www.gnu.org/software/tramp/#Improving-performance-of-asynchronous-remote-processes
|
||||||
(connection-local-set-profile-variables
|
(connection-local-set-profile-variables
|
||||||
'remote-direct-async-process
|
'remote-direct-async-process
|
||||||
'((tramp-direct-async-process . t)))
|
'((tramp-direct-async-process . t)))
|
||||||
(connection-local-set-profiles
|
(connection-local-set-profiles
|
||||||
'(:application tramp :protocol "ssh")
|
'(:application tramp :protocol "rsync")
|
||||||
'remote-direct-async-process)
|
'remote-direct-async-process)
|
||||||
|
(setq magit-tramp-pipe-stty-settings 'pty)
|
||||||
|
(with-eval-after-load 'compile
|
||||||
|
(remove-hook 'compilation-mode-hook #'tramp-compile-disable-ssh-controlmaster-options))
|
||||||
;; Tips to speed up connections
|
;; Tips to speed up connections
|
||||||
(setq tramp-verbose 0)
|
(setq tramp-verbose 0)
|
||||||
(setq tramp-chunksize 2000)
|
(setq tramp-chunksize 2000)
|
||||||
(setq tramp-ssh-controlmaster-options nil))
|
(setq tramp-copy-size-limit nil))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|||||||
126
config/ibuffer.org
Normal file
126
config/ibuffer.org
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
* IBuffer
|
||||||
|
|
||||||
|
Buffer management is a constant irritation with any editor. After
|
||||||
|
having a bit of a performance issue when using [[https://github.com/florommel/bufferlo][bufferlo]] I've decided
|
||||||
|
to try doing something with emacs's built in IBuffer.
|
||||||
|
|
||||||
|
This is *heavily* inspired, and mostly outright copied from this [[https://olddeuteronomy.github.io/post/emacs-ibuffer-config/][post]]
|
||||||
|
by [[https://olddeuteronomy.github.io][The Emacs Cat]].
|
||||||
|
|
||||||
|
Icons can make identifying buffers easy at a glance so I think adding
|
||||||
|
them is pretty handy.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package all-the-icons-ibuffer
|
||||||
|
:ensure t
|
||||||
|
:after (all-the-icons)
|
||||||
|
:hook
|
||||||
|
(ibuffer-mode . all-the-icons-ibuffer-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Now for the main part of the configuration. This provides a nice
|
||||||
|
logical grouping for buffers. As I use this more I might change
|
||||||
|
the grouping to be a bit less file type oriented, and lean more
|
||||||
|
towards use case.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package ibuffer :ensure nil
|
||||||
|
:bind
|
||||||
|
(("C-x B" . ibuffer))
|
||||||
|
:config
|
||||||
|
(setq ibuffer-expert t)
|
||||||
|
(setq ibuffer-display-summary nil)
|
||||||
|
(setq ibuffer-use-other-window nil)
|
||||||
|
(setq ibuffer-show-empty-filter-groups nil)
|
||||||
|
(setq ibuffer-default-sorting-mode 'filename/process)
|
||||||
|
(setq ibuffer-title-face 'font-lock-doc-face)
|
||||||
|
(setq ibuffer-use-header-line t)
|
||||||
|
(setq ibuffer-default-shrink-to-minimum-size nil)
|
||||||
|
(setq ibuffer-formats
|
||||||
|
'((mark modified read-only locked " "
|
||||||
|
(name 30 30 :left :elide)
|
||||||
|
" "
|
||||||
|
(size 9 -1 :right)
|
||||||
|
" "
|
||||||
|
(mode 16 16 :left :elide)
|
||||||
|
" " filename-and-process)
|
||||||
|
(mark " "
|
||||||
|
(name 16 -1)
|
||||||
|
" " filename)))
|
||||||
|
(setq ibuffer-saved-filter-groups
|
||||||
|
'(("Main"
|
||||||
|
("Directories" (mode . dired-mode))
|
||||||
|
("C++" (or
|
||||||
|
(mode . c++-mode)
|
||||||
|
(mode . c++-ts-mode)
|
||||||
|
(mode . c-mode)
|
||||||
|
(mode . c-ts-mode)
|
||||||
|
(mode . c-or-c++-ts-mode)))
|
||||||
|
("Python" (or
|
||||||
|
(mode . python-ts-mode)
|
||||||
|
(mode . c-mode)
|
||||||
|
(mode . python-mode)))
|
||||||
|
("Build" (or
|
||||||
|
(mode . make-mode)
|
||||||
|
(mode . makefile-gmake-mode)
|
||||||
|
(name . "^Makefile$")
|
||||||
|
(mode . change-log-mode)))
|
||||||
|
("Scripts" (or
|
||||||
|
(mode . shell-script-mode)
|
||||||
|
(mode . shell-mode)
|
||||||
|
(mode . sh-mode)
|
||||||
|
(mode . lua-mode)
|
||||||
|
(mode . bat-mode)))
|
||||||
|
("Config" (or
|
||||||
|
(mode . conf-mode)
|
||||||
|
(mode . conf-toml-mode)
|
||||||
|
(mode . toml-ts-mode)
|
||||||
|
(mode . conf-windows-mode)
|
||||||
|
(name . "^\\.clangd$")
|
||||||
|
(name . "^\\.gitignore$")
|
||||||
|
(name . "^Doxyfile$")
|
||||||
|
(name . "^config\\.toml$")
|
||||||
|
(mode . yaml-mode)))
|
||||||
|
("Web" (or
|
||||||
|
(mode . mhtml-mode)
|
||||||
|
(mode . html-mode)
|
||||||
|
(mode . web-mode)
|
||||||
|
(mode . nxml-mode)))
|
||||||
|
("CSS" (or
|
||||||
|
(mode . css-mode)
|
||||||
|
(mode . sass-mode)))
|
||||||
|
("JS" (or
|
||||||
|
(mode . js-mode)
|
||||||
|
(mode . rjsx-mode)))
|
||||||
|
("Markup" (or
|
||||||
|
(mode . markdown-mode)
|
||||||
|
(mode . adoc-mode)))
|
||||||
|
("Org" (mode . org-mode))
|
||||||
|
("LaTeX" (name . "\.tex$"))
|
||||||
|
("Magit" (or
|
||||||
|
(mode . magit-blame-mode)
|
||||||
|
(mode . magit-cherry-mode)
|
||||||
|
(mode . magit-diff-mode)
|
||||||
|
(mode . magit-log-mode)
|
||||||
|
(mode . magit-process-mode)
|
||||||
|
(mode . magit-status-mode)))
|
||||||
|
("Apps" (or
|
||||||
|
(mode . elfeed-search-mode)
|
||||||
|
(mode . elfeed-show-mode)))
|
||||||
|
("Fundamental" (or
|
||||||
|
(mode . fundamental-mode)
|
||||||
|
(mode . text-mode)))
|
||||||
|
("Emacs" (or
|
||||||
|
(mode . emacs-lisp-mode)
|
||||||
|
(name . "^\\*Help\\*$")
|
||||||
|
(name . "^\\*Custom.*")
|
||||||
|
(name . "^\\*Org Agenda\\*$")
|
||||||
|
(name . "^\\*info\\*$")
|
||||||
|
(name . "^\\*scratch\\*$")
|
||||||
|
(name . "^\\*Backtrace\\*$")
|
||||||
|
(name . "^\\*Messages\\*$"))))))
|
||||||
|
:hook
|
||||||
|
(ibuffer-mode . (lambda ()
|
||||||
|
(ibuffer-switch-to-saved-filter-groups "Main")))
|
||||||
|
)
|
||||||
|
#+end_src
|
||||||
@@ -23,6 +23,17 @@ I like using catppuccin from time to time as well.
|
|||||||
(use-package catppuccin-theme :ensure t)
|
(use-package catppuccin-theme :ensure t)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* Icons
|
||||||
|
|
||||||
|
Some Icons might spruce things up a bit. Might as well try to have
|
||||||
|
[[https://github.com/domtronn/all-the-icons.el][all the icons]]!
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package all-the-icons
|
||||||
|
:ensure t
|
||||||
|
:if (display-graphic-p))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Modeline
|
** Modeline
|
||||||
|
|
||||||
Doom emacs has a great modeline in my opinion so I'm using theirs almost
|
Doom emacs has a great modeline in my opinion so I'm using theirs almost
|
||||||
|
|||||||
@@ -34,3 +34,20 @@ well.
|
|||||||
Many of these settings are there to reduce flickering. They may not be needed
|
Many of these settings are there to reduce flickering. They may not be needed
|
||||||
long term.
|
long term.
|
||||||
|
|
||||||
|
** Eshell
|
||||||
|
|
||||||
|
I eshell quite often. Here are some plugins that can add some missing functionality
|
||||||
|
beyond what eat-shell-mode gives.
|
||||||
|
|
||||||
|
*** eshell-venv
|
||||||
|
|
||||||
|
[[https://git.sr.ht/~struanr/eshell-venv][Eshell-venv]] is an Emacs package providing functions for activating and deactivating
|
||||||
|
Python virtual environments in Eshell.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package eshell-venv
|
||||||
|
:ensure
|
||||||
|
(:repo "https://git.sr.ht/~struanr/eshell-venv")
|
||||||
|
:hook
|
||||||
|
(eshell-mode . eshell-venv-mode))
|
||||||
|
#+end_src
|
||||||
|
|||||||
Reference in New Issue
Block a user