mirror of
https://codeberg.org/hyperreal/doom-emacs-config
synced 2024-11-25 03:43:42 +01:00
Tidy and update
This commit is contained in:
parent
e2971f4477
commit
bde47a165d
170
config.el
170
config.el
@ -6,6 +6,12 @@
|
||||
(setq user-full-name "Jeffrey Serio"
|
||||
user-mail-address "hyperreal@fedoraproject.org")
|
||||
|
||||
(setq doom-user-dir "~/sync/doom/")
|
||||
|
||||
(after! projectile
|
||||
(setq projectile-project-root-files-bottom-up
|
||||
(remove ".git" projectile-project-root-files-bottom-up)))
|
||||
|
||||
;; This sets the frame dimensions and position on the screen when on moonshadow host.
|
||||
;; Also sets the font size for moonshadow host.
|
||||
(when (string= (system-name) "moonshadow")
|
||||
@ -129,8 +135,6 @@ If point was already at that position, move point to beginning of line."
|
||||
org-annotate-file
|
||||
org-choose
|
||||
org-collector
|
||||
org-man
|
||||
org-notify
|
||||
))
|
||||
(eval-after-load 'org
|
||||
'(org-load-modules-maybe t))
|
||||
@ -310,102 +314,86 @@ If point was already at that position, move point to beginning of line."
|
||||
dired-recursive-deletes 'always))
|
||||
|
||||
|
||||
;;;; elfeed
|
||||
|
||||
(elfeed-protocol-enable)
|
||||
(run-with-idle-timer (* 15 60) t #'elfeed-update)
|
||||
(setq elfeed-protocol-ttrss-maxsize 200)
|
||||
(setq elfeed-feeds (list
|
||||
(list "ttrss+https://hyperreal@rss.envs.net"
|
||||
:password (shell-command-to-string "echo -n `pass show envs.net/ttrss`"))))
|
||||
|
||||
|
||||
;;;; dictionary
|
||||
|
||||
(global-set-key (kbd "C-c l") #'dictionary-lookup-definition)
|
||||
(setq dictionary-server "dict.org")
|
||||
|
||||
|
||||
;;;; undo-tree
|
||||
;;;; centaur-tabs
|
||||
|
||||
(use-package undo-tree
|
||||
:diminish undo-tree-mode
|
||||
:config
|
||||
(progn
|
||||
(global-undo-tree-mode)
|
||||
(setq undo-tree-visualizer-timestamps t)
|
||||
(setq undo-tree-visualizer-diff t)
|
||||
(setq undo-tree-history-directory-alist '(("." . "~/sync/emacs/backups/undo-tree")))))
|
||||
(global-set-key (kbd "s-{") 'centaur-tabs-switch-group)
|
||||
(setq centaur-tabs-buffer-show-groups t)
|
||||
|
||||
(defun centaur-tabs-buffer-groups ()
|
||||
"`centaur-tabs-buffer-groups' control buffers' group rules.
|
||||
|
||||
Group centaur-tabs with mode if buffer is derived from `eshell-mode'
|
||||
`emacs-lisp-mode' `dired-mode' `org-mode' `magit-mode'
|
||||
All buffer names starting with * will group to \"Emacs\".
|
||||
Other buffer groups by `centaur-tabs-get-group-name' wit project name."
|
||||
(list
|
||||
(cond
|
||||
((or (string-equal "*" (substring (buffer-name) 0 1))
|
||||
(memq major-mode '(magit-process-mode
|
||||
magit-status-mode
|
||||
magit-diff-mode
|
||||
magit-log-mode
|
||||
magit-file-mode
|
||||
magit-blob-mode
|
||||
magit-blame-mode
|
||||
)))
|
||||
"Emacs")
|
||||
((derived-mode-p 'prog-mode)
|
||||
"Editing")
|
||||
((derived-mode-p 'dired-mode)
|
||||
"Dired")
|
||||
((memq major-mode '(helpful-mode
|
||||
help-mode))
|
||||
"Help")
|
||||
((memq major-mode '(org-mode
|
||||
org-agenda-clockreport-mode
|
||||
org-src-mode
|
||||
org-agenda-mode
|
||||
org-beamer-mode
|
||||
org-indent-mode
|
||||
org-bullets-mode
|
||||
org-agenda-log-mode
|
||||
diary-mode
|
||||
org-roam-mode))
|
||||
"OrgMode")
|
||||
(t
|
||||
(centaur-tabs-get-group-name (current-buffer))))))
|
||||
|
||||
;; prevent access to specified buffers
|
||||
(defun centaur-tabs-hide-tab (x)
|
||||
"Do not show given buffer in tabs."
|
||||
(let ((name (format "%s" x)))
|
||||
(or
|
||||
;; Current window is not dedicated window.
|
||||
(window-dedicated-p (selected-window))
|
||||
|
||||
;; Buffer name does not match blacklisted buffers.
|
||||
(string-prefix-p "*epc" name)
|
||||
(string-prefix-p "*Compile-Log*" name)
|
||||
(string-prefix-p "*lsp" name)
|
||||
(string-prefix-p "*tramp" name)
|
||||
(string-prefix-p "*help" name)
|
||||
(string-prefix-p "*Help" name)
|
||||
|
||||
;; Buffer is not a magit buffer.
|
||||
(and (string-prefix-p "magit" name)
|
||||
(not (file-name-extension name)))
|
||||
)))
|
||||
|
||||
|
||||
;;;; tab-bar-mode
|
||||
;;;; elfeed
|
||||
|
||||
(global-set-key (kbd "s-{") 'tab-bar-switch-to-prev-tab)
|
||||
(global-set-key (kbd "s-}") 'tab-bar-switch-to-next-tab)
|
||||
(global-set-key (kbd "s-t") 'tab-bar-new-tab)
|
||||
(global-set-key (kbd "s-w") 'tab-bar-close-tab)
|
||||
(tab-bar-mode 1)
|
||||
(setq tab-bar-close-button-show nil)
|
||||
(setq tab-bar-new-tab-choice "*doom*")
|
||||
(setq tab-bar-tab-hints t)
|
||||
(setq tab-bar-format '(tab-bar-format-history tab-bar-format-tabs tab-bar-separator))
|
||||
(setq tab-bar-select-tab-modifiers "super")
|
||||
|
||||
|
||||
;;;; bufler-mode
|
||||
|
||||
(setq bufler-tabs-mode 1)
|
||||
(global-set-key (kbd "C-x b") 'bufler-switch-buffer)
|
||||
|
||||
(bufler-defgroups
|
||||
(group
|
||||
;; Subgroup collecting all named workspaces.
|
||||
(auto-workspace))
|
||||
(group
|
||||
;; Subgroup collecting all help-mode and info-mode buffers
|
||||
(group-or "*Help/Info*"
|
||||
(mode-match "*Help*" (rx bos "help-"))
|
||||
(mode-match "*Info*" (rx bos "info-"))))
|
||||
(group
|
||||
;; Subgroup collecting all special buffers (i.e. ones that are not
|
||||
;; file-backed), except magit-status-mode buffers (which are allowed to fall
|
||||
;; through to other groups, so they end up grouped with their project buffers).
|
||||
(group-and "*Special*"
|
||||
(lambda (buffer)
|
||||
(unless (or (funcall (mode-match "Magit" (rx bos "magit-status"))
|
||||
buffer)
|
||||
(funcall (mode-match "Dired" (rx bos "dired"))
|
||||
buffer)
|
||||
(funcall (auto-file) buffer))
|
||||
"*Special*")))
|
||||
(group
|
||||
;; Subgroup collecting these "special special" buffers
|
||||
;; separately for convenience.
|
||||
(name-match "**Special**"
|
||||
(rx bos "*" (or "Messages" "Warnings" "scratch" "Backtrace") "*")))
|
||||
(group
|
||||
;; Subgroup collecting all other Magit buffers, grouped by directory.
|
||||
(mode-match "*Magit* (non-status)" (rx bos (or "magit" "forge") "-"))
|
||||
(auto-directory))
|
||||
;; Remaining special buffers are grouped automatically by mode.
|
||||
(auto-mode))
|
||||
;; All buffers under ~/.doom.d
|
||||
(dir doom-user-dir)
|
||||
(group
|
||||
;; Subgroup collecting buffers in org-directory.
|
||||
(dir org-directory)
|
||||
(dir org-roam-directory)
|
||||
(group
|
||||
;; Subgroup collecting indirect Org buffers, grouping them by file.
|
||||
;; This is very useful when used with org-tree-to-indirect-buffer.
|
||||
(auto-indirect)
|
||||
(auto-file))
|
||||
(group-not "*special*" (auto-file))
|
||||
(auto-mode))
|
||||
(group
|
||||
;; Subgroup collecting buffers in a version-control project,
|
||||
;; grouping them by directory.
|
||||
(auto-project))
|
||||
;; Group remaining buffers by directory, then major mode.
|
||||
(auto-directory)
|
||||
(auto-mode))
|
||||
(elfeed-goodies/setup)
|
||||
(setq elfeed-show-entry-switch 'pop-to-buffer-same-window)
|
||||
(setq elfeed-protocol-enabled-protocols '(ttrss))
|
||||
(elfeed-protocol-enable)
|
||||
(setq elfeed-protocol-ttrss-maxsize 200)
|
||||
(setq elfeed-feeds (list
|
||||
(list "ttrss+https://hyperreal@rss.envs.net"
|
||||
:password (shell-command-to-string "echo -n `pass show envs.net/ttrss`"))))
|
||||
|
4
init.el
4
init.el
@ -43,7 +43,7 @@
|
||||
;;neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;; tabs ; a tab bar for Emacs
|
||||
tabs ; a tab bar for Emacs
|
||||
;;treemacs ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
(vc-gutter +pretty) ; vcs diff in the fringe
|
||||
@ -187,7 +187,7 @@
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;; irc ; how neckbeards socialize
|
||||
(rss +org) ; emacs as an RSS reader
|
||||
;; (rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
|
@ -9,8 +9,9 @@
|
||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||
;(package! some-package)
|
||||
(package! autothemer)
|
||||
(package! bufler)
|
||||
(package! catppuccin-theme)
|
||||
(package! elfeed)
|
||||
(package! elfeed-goodies)
|
||||
(package! elfeed-protocol)
|
||||
(package! elfeed-tube)
|
||||
(package! elfeed-tube-mpv)
|
||||
@ -18,7 +19,7 @@
|
||||
(package! evil-nerd-commenter)
|
||||
(package! fzf)
|
||||
(package! gemini :recipe
|
||||
(:host nil :repo "https://git.carcosa.net/jmcbray/gemini.el"))
|
||||
(:host nil :repo "https://git.carcosa.net/jmcbray/gemini.el"))
|
||||
(package! go-complete)
|
||||
(package! importmagic)
|
||||
(package! just-mode)
|
||||
@ -31,4 +32,3 @@
|
||||
(package! python-docstring)
|
||||
(package! shell-pop)
|
||||
(package! systemd)
|
||||
(package! undo-tree)
|
||||
|
Loading…
Reference in New Issue
Block a user