Some buffer and performance changes. Spiffed up ibuffer.
This commit is contained in:
@@ -37,7 +37,7 @@ certain dependencies. It will function without them however.
|
||||
("d" "~/Downloads/" "Downloads")
|
||||
("s" "/ssh:192.168.88.1" "SSH server")))
|
||||
:config
|
||||
(dirvish-peek-mode) ; Preview files in minibuffer
|
||||
;;(dirvish-peek-mode) ; Preview files in minibuffer
|
||||
(dirvish-side-follow-mode) ; similar to `treemacs-follow-mode'
|
||||
(setq dirvish-mode-line-format
|
||||
'(: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
|
||||
;; Garbage collection
|
||||
(use-package gcmh
|
||||
:ensure t
|
||||
:hook (after-init . gcmh-mode)
|
||||
:demand t
|
||||
:init
|
||||
(gcmh-mode)
|
||||
:custom
|
||||
(gcmh-idle-delay 'auto)
|
||||
(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
|
||||
(use-feature tramp
|
||||
: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
|
||||
;; https://www.gnu.org/software/tramp/#Improving-performance-of-asynchronous-remote-processes
|
||||
(connection-local-set-profile-variables
|
||||
'remote-direct-async-process
|
||||
'((tramp-direct-async-process . t)))
|
||||
(connection-local-set-profiles
|
||||
'(:application tramp :protocol "ssh")
|
||||
'(:application tramp :protocol "rsync")
|
||||
'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
|
||||
(setq tramp-verbose 0)
|
||||
(setq tramp-chunksize 2000)
|
||||
(setq tramp-ssh-controlmaster-options nil))
|
||||
(setq tramp-copy-size-limit nil))
|
||||
#+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)
|
||||
#+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
|
||||
|
||||
Doom emacs has a great modeline in my opinion so I'm using theirs almost
|
||||
|
||||
Reference in New Issue
Block a user