From 761127be9cbd1bf8a1109d79ac62938f0fe310d1 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Tue, 22 Aug 2023 20:19:41 -0500 Subject: [PATCH] Adding elfeed to config --- .config/emacs/config.el | 85 +++++++++++++++++++----- .config/emacs/config.org | 136 ++++++++++++++++++++++++++------------- 2 files changed, 159 insertions(+), 62 deletions(-) diff --git a/.config/emacs/config.el b/.config/emacs/config.el index 97dc55d..435480c 100644 --- a/.config/emacs/config.el +++ b/.config/emacs/config.el @@ -11,8 +11,6 @@ (use-package all-the-icons-dired :hook (dired-mode . (lambda () (all-the-icons-dired-mode t)))) -(global-auto-revert-mode t) - (setq backup-directory-alist '((".*" . "~/.Trash"))) (use-package company @@ -52,8 +50,6 @@ :config (dashboard-setup-startup-hook)) -(delete-selection-mode 1) - (use-package diminish) (use-package dired-open @@ -74,6 +70,36 @@ (evil-define-key 'normal peep-dired-mode-map (kbd "k") 'peep-dired-prev-file) ) +(use-package elfeed + :config + (setq elfeed-search-feed-face ":foreground #ffffff :weight bold" + elfeed-feeds (quote + (("https://www.reddit.com/r/linux.rss" reddit linux) + ("https://www.reddit.com/r/commandline.rss" reddit commandline) + ("https://www.reddit.com/r/distrotube.rss" reddit distrotube) + ("https://www.reddit.com/r/emacs.rss" reddit emacs) + ("https://www.gamingonlinux.com/article_rss.php" gaming linux) + ("https://hackaday.com/blog/feed/" hackaday linux) + ("https://opensource.com/feed" opensource linux) + ("https://linux.softpedia.com/backend.xml" softpedia linux) + ("https://itsfoss.com/feed/" itsfoss linux) + ("https://www.zdnet.com/topic/linux/rss.xml" zdnet linux) + ("https://www.phoronix.com/rss.php" phoronix linux) + ("http://feeds.feedburner.com/d0od" omgubuntu linux) + ("https://www.computerworld.com/index.rss" computerworld linux) + ("https://www.networkworld.com/category/linux/index.rss" networkworld linux) + ("https://www.techrepublic.com/rssfeeds/topic/open-source/" techrepublic linux) + ("https://betanews.com/feed" betanews linux) + ("http://lxer.com/module/newswire/headlines.rss" lxer linux) + ("https://distrowatch.com/news/dwd.xml" distrowatch linux))))) + + +(use-package elfeed-goodies + :init + (elfeed-goodies/setup) + :config + (setq elfeed-goodies/entry-pane-size 0.5)) + ;; Expands to: (elpaca evil (use-package evil :demand t)) (use-package evil :init ;; tweak evil's configuration before loading it @@ -86,7 +112,11 @@ (use-package evil-collection :after evil :config - (setq evil-collection-mode-list '(dashboard dired ibuffer)) + ;; Do not uncomment this unless you want to specify each and every mode + ;; that evil-collection should works with. The following line is here + ;; for documentation purposes in case you need it. + ;; (setq evil-collection-mode-list '(calendar dashboard dired ediff info magit ibuffer)) + (add-to-list 'evil-collection-mode-list 'help) ;; evilify help mode (evil-collection-init)) (use-package evil-tutor) @@ -338,12 +368,18 @@ (use-package magit) -(menu-bar-mode -1) -(tool-bar-mode -1) -(scroll-bar-mode -1) - -(global-display-line-numbers-mode 1) -(global-visual-line-mode t) +(use-package hl-todo + :hook ((org-mode . hl-todo-mode) + (prog-mode . hl-todo-mode)) + :config + (setq hl-todo-highlight-punctuation ":" + hl-todo-keyword-faces + `(("TODO" warning bold) + ("FIXME" error bold) + ("HACK" font-lock-constant-face bold) + ("REVIEW" font-lock-keyword-face bold) + ("NOTE" success bold) + ("DEPRECATED" font-lock-doc-face bold)))) (use-package counsel :after ivy @@ -420,9 +456,6 @@ (use-package org-bullets) (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) -(electric-indent-mode -1) -(setq org-edit-src-content-indentation 0) - (eval-after-load 'org-indent '(diminish 'org-indent-mode)) (custom-set-faces @@ -457,10 +490,31 @@ :config (projectile-mode 1)) +(use-package rainbow-delimiters + :hook ((emacs-lisp-mode . rainbow-delimiters-mode) + (clojure-mode . rainbow-delimiters-mode))) + (use-package rainbow-mode :diminish :hook org-mode prog-mode) +(delete-selection-mode 1) ;; You can select text and delete it by typing. +(electric-indent-mode -1) ;; Turn off the weird indenting that Emacs does by default. +(electric-pair-mode 1) ;; Turns on automatic parens pairing +;; The following prevents <> from auto-pairing when electric-pair-mode is on. +;; Otherwise, org-tempo is broken when you try to ") 'vterm--self-insert) diff --git a/.config/emacs/config.org b/.config/emacs/config.org index 2a474b2..8b195a4 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -9,13 +9,12 @@ - [[#adding-the-scripts-directory-to-path][Adding the scripts directory to path]] - [[#sourcing-the-scripts][Sourcing the scripts]] - [[#all-the-icons][ALL THE ICONS]] -- [[#auto-revert-mode][AUTO REVERT MODE]] - [[#backup][BACKUP]] - [[#company][COMPANY]] - [[#dashboard][DASHBOARD]] -- [[#deletion-selection][DELETION SELECTION]] - [[#diminish][DIMINISH]] - [[#dired][DIRED]] +- [[#elfeed][ELFEED]] - [[#evil][EVIL]] - [[#flycheck][FLYCHECK]] - [[#fonts][FONTS]] @@ -25,9 +24,7 @@ - [[#git-programs][GIT PROGRAMS]] - [[#git-time-machine][Git Time Machine]] - [[#magit][Magit]] -- [[#graphical-user-interface-tweaks][GRAPHICAL USER INTERFACE TWEAKS]] - - [[#disable-menubar-toolbars-and-scrollbars][Disable Menubar, Toolbars and Scrollbars]] - - [[#display-line-numbers-and-truncated-lines][Display Line Numbers and Truncated Lines]] +- [[#highlight-todo][HIGHLIGHT TODO]] - [[#ivy-counsel][IVY (COUNSEL)]] - [[#language-support][LANGUAGE SUPPORT]] - [[#minibuffer-escape][MINIBUFFER ESCAPE]] @@ -36,13 +33,14 @@ - [[#org-mode][ORG MODE]] - [[#enabling-table-of-contents][Enabling Table of Contents]] - [[#enabling-org-bullets][Enabling Org Bullets]] - - [[#disable-electric-indent][Disable Electric Indent]] - [[#diminish-org-indent-mode][Diminish Org Indent Mode]] - [[#org-level-headers][Org Level Headers]] - [[#source-code-block-tag-expansion][Source Code Block Tag Expansion]] - [[#perspective][PERSPECTIVE]] - [[#projectile][PROJECTILE]] +- [[#rainbow-delimters][RAINBOW DELIMTERS]] - [[#rainbow-mode][RAINBOW MODE]] +- [[#sane-defaults][SANE DEFAULTS]] - [[#shells-and-terminals][SHELLS AND TERMINALS]] - [[#eshell][Eshell]] - [[#vterm][Vterm]] @@ -80,14 +78,6 @@ This is an icon set that can be used with dashboard, dired, ibuffer and other Em :hook (dired-mode . (lambda () (all-the-icons-dired-mode t)))) #+end_src -* AUTO REVERT MODE -By default, Emacs does not automatically show the changes in a file that has been edited in a different program. So if you have =file1= open in Emacs, and then also edit =file1= via the command line or another text editor, the Emacs buffer does not reflect those changes. The following line corrects this problem. - -#+begin_src emacs-lisp -(global-auto-revert-mode t) - -#+end_src - * BACKUP By default, Emacs creates automatic backups of files in their original directories, such "file.el" and the backup "file.el~". This leads to a lot of clutter, so let's tell Emacs to put all backups that it creates in the =TRASH= directory. @@ -144,14 +134,6 @@ Emacs Dashboard is an extensible startup screen showing you recent files, bookma #+end_src -* DELETION SELECTION -Delete Selection mode lets you treat an Emacs region much like a typical text selection outside of Emacs: You can replace the active region just by typing text, and you can delete the selected text just by hitting the Backspace key (‘DEL’). - -#+begin_src emacs-lisp -(delete-selection-mode 1) - -#+end_src - * DIMINISH This package implements hiding or abbreviation of the modeline displays (lighters) of minor-modes. With this package installed, you can add ':diminish' to any use-package block to hide that particular mode in the modeline. @@ -182,6 +164,42 @@ This package implements hiding or abbreviation of the modeline displays (lighter #+end_src +* ELFEED +An RSS newsfeed reader for Emacs. + +#+begin_src emacs-lisp +(use-package elfeed + :config + (setq elfeed-search-feed-face ":foreground #ffffff :weight bold" + elfeed-feeds (quote + (("https://www.reddit.com/r/linux.rss" reddit linux) + ("https://www.reddit.com/r/commandline.rss" reddit commandline) + ("https://www.reddit.com/r/distrotube.rss" reddit distrotube) + ("https://www.reddit.com/r/emacs.rss" reddit emacs) + ("https://www.gamingonlinux.com/article_rss.php" gaming linux) + ("https://hackaday.com/blog/feed/" hackaday linux) + ("https://opensource.com/feed" opensource linux) + ("https://linux.softpedia.com/backend.xml" softpedia linux) + ("https://itsfoss.com/feed/" itsfoss linux) + ("https://www.zdnet.com/topic/linux/rss.xml" zdnet linux) + ("https://www.phoronix.com/rss.php" phoronix linux) + ("http://feeds.feedburner.com/d0od" omgubuntu linux) + ("https://www.computerworld.com/index.rss" computerworld linux) + ("https://www.networkworld.com/category/linux/index.rss" networkworld linux) + ("https://www.techrepublic.com/rssfeeds/topic/open-source/" techrepublic linux) + ("https://betanews.com/feed" betanews linux) + ("http://lxer.com/module/newswire/headlines.rss" lxer linux) + ("https://distrowatch.com/news/dwd.xml" distrowatch linux))))) + + +(use-package elfeed-goodies + :init + (elfeed-goodies/setup) + :config + (setq elfeed-goodies/entry-pane-size 0.5)) + +#+end_src + * EVIL [[https://github.com/emacs-evil/evil][Evil]] is an extensible vi/vim layer for Emacs. Because...let's face it. The Vim keybindings are just plain better. @@ -198,7 +216,11 @@ This package implements hiding or abbreviation of the modeline displays (lighter (use-package evil-collection :after evil :config - (setq evil-collection-mode-list '(dashboard dired ibuffer)) + ;; Do not uncomment this unless you want to specify each and every mode + ;; that evil-collection should works with. The following line is here + ;; for documentation purposes in case you need it. + ;; (setq evil-collection-mode-list '(calendar dashboard dired ediff info magit ibuffer)) + (add-to-list 'evil-collection-mode-list 'help) ;; evilify help mode (evil-collection-init)) (use-package evil-tutor) #+end_src @@ -486,20 +508,23 @@ You can use the bindings CTRL plus =/- for zooming in/out. You can also use CTR #+end_src -* GRAPHICAL USER INTERFACE TWEAKS -Let's make GNU Emacs look a little better. +* HIGHLIGHT TODO +Adding highlights to TODO and related words. -** Disable Menubar, Toolbars and Scrollbars #+begin_src emacs-lisp -(menu-bar-mode -1) -(tool-bar-mode -1) -(scroll-bar-mode -1) -#+end_src +(use-package hl-todo + :hook ((org-mode . hl-todo-mode) + (prog-mode . hl-todo-mode)) + :config + (setq hl-todo-highlight-punctuation ":" + hl-todo-keyword-faces + `(("TODO" warning bold) + ("FIXME" error bold) + ("HACK" font-lock-constant-face bold) + ("REVIEW" font-lock-keyword-face bold) + ("NOTE" success bold) + ("DEPRECATED" font-lock-doc-face bold)))) -** Display Line Numbers and Truncated Lines -#+begin_src emacs-lisp -(global-display-line-numbers-mode 1) -(global-visual-line-mode t) #+end_src * IVY (COUNSEL) @@ -622,14 +647,6 @@ Org-bullets gives us attractive bullets rather than asterisks. (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) #+end_src -** Disable Electric Indent -Org mode source blocks have some really weird and annoying default indentation behavior. I think this has to do with electric-indent-mode, which is turned on by default in Emacs, and the fact that Org defaults to indenting 2 spaces in source blocks. So let's turn it all of that OFF! - -#+begin_src emacs-lisp -(electric-indent-mode -1) -(setq org-edit-src-content-indentation 0) -#+end_src - ** Diminish Org Indent Mode Removes "Ind" from showing in the modeline. @@ -702,6 +719,16 @@ Org-tempo is not a separate package but a module within org that can be enabled. (projectile-mode 1)) #+end_src +* RAINBOW DELIMTERS +Adding rainbow coloring to parentheses. + +#+begin_src emacs-lisp +(use-package rainbow-delimiters + :hook ((emacs-lisp-mode . rainbow-delimiters-mode) + (clojure-mode . rainbow-delimiters-mode))) + +#+end_src + * RAINBOW MODE Display the actual color as a background for any hex color value (ex. #ffffff). The code block below enables rainbow-mode in all programming modes (prog-mode) as well as org-mode, which is why rainbow works in this document. @@ -711,6 +738,28 @@ Display the actual color as a background for any hex color value (ex. #ffffff). :hook org-mode prog-mode) #+end_src +* SANE DEFAULTS +The following settings are simple modes that are enabled (or disabled) so that Emacs functions more like you would expect a proper editor/IDE to function. + +#+begin_src emacs-lisp +(delete-selection-mode 1) ;; You can select text and delete it by typing. +(electric-indent-mode -1) ;; Turn off the weird indenting that Emacs does by default. +(electric-pair-mode 1) ;; Turns on automatic parens pairing +;; The following prevents <> from auto-pairing when electric-pair-mode is on. +;; Otherwise, org-tempo is broken when you try to ") 'vterm--self-insert)