From ff9a02b6c9d997f44af4dade8d1ae2daa91434a1 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 18 Nov 2022 09:32:48 -0600 Subject: [PATCH] adding tree-sitter and mastodon --- README.org | 30 +++++++++++++++++++++++++++--- init.el | 25 +++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 9f545b27..a14c38e5 100644 --- a/README.org +++ b/README.org @@ -48,6 +48,7 @@ - [[#hass][HASS]] - [[#pass][Pass]] - [[#matrixement][Matrix/Ement]] + - [[#mastodon][Mastodon]] - [[#activitywatch][ActivityWatch]] - [[#languagetool][LanguageTool]] - [[#qrencode][qrencode]] @@ -237,7 +238,7 @@ Now, let's turn on =use-package=. (eval-when-compile (require 'use-package)) #+end_src -,#+begin_src emacs-lisp +#+begin_src emacs-lisp (setq use-package-verbose t) (defalias 'yes-or-no-p 'y-or-n-p) #+end_src @@ -1973,8 +1974,11 @@ Let's also set =hl-line-mode= to be on for comint and prog modes *** Tree Sitter I'm gonna try this to speed up emacs and make it nicer -#+begin_src emacs-lisp :tangle no -(use-package tree-sitter) +#+begin_src emacs-lisp +(use-package tree-sitter + :config + (global-tree-sitter-mode +1) + ) (use-package tree-sitter-langs) #+end_src @@ -3246,6 +3250,26 @@ Matrix.el is a decent enough matrix client built in emacs. Like it. "oM" 'ement-list-rooms)) #+end_src +** Mastodon +I'd like to access the mastodon world through emacs too. +#+begin_src emacs-lisp +(use-package mastodon + :config + (setq mastodon-instance-url "https://mastodon.online" + mastodon-active-user "chriscochrun") + :general + (chris/leader-keys + "oF" 'mastodon) + (general-def mastodon-mode-map + "q" 'bury-buffer + "p" 'mastodon-toot + "r" 'mastodon-tl--update + "b" 'mastodon-toot--toggle-boost + "H" 'mastodon-tl--get-home-timeline + "F" 'mastodon-tl--get-federated-timeline + "N" 'mastodon-notifications--timeline)) +#+end_src + ** ActivityWatch I like to track my time with ActivityWatch so I can notice and kill bad habits. At least I used to but it is pretty heavy on resources and doesn't work on Wayland. #+begin_src emacs-lisp :tangle no diff --git a/init.el b/init.el index f3b5144b..5eaadc55 100644 --- a/init.el +++ b/init.el @@ -96,6 +96,9 @@ (eval-when-compile (require 'use-package)) +(setq use-package-verbose t) +(defalias 'yes-or-no-p 'y-or-n-p) + (use-package command-log-mode :commands command-log-mode) @@ -1348,6 +1351,12 @@ targets." (add-hook 'prog-mode-hook 'hl-line-mode) (add-hook 'prog-mode-hook 'hs-minor-mode) +(use-package tree-sitter + :config + (global-tree-sitter-mode +1) + ) +(use-package tree-sitter-langs) + (add-hook 'c++-mode-hook 'eglot) (use-package web-mode @@ -2311,6 +2320,22 @@ interfere with the default `bongo-playlist-buffer'." (chris/leader-keys "oM" 'ement-list-rooms)) +(use-package mastodon + :config + (setq mastodon-instance-url "https://mastodon.online" + mastodon-active-user "chriscochrun") + :general + (chris/leader-keys + "oF" 'mastodon) + (general-def mastodon-mode-map + "q" 'bury-buffer + "p" 'mastodon-toot + "r" 'mastodon-tl--update + "b" 'mastodon-toot--toggle-boost + "H" 'mastodon-tl--get-home-timeline + "F" 'mastodon-tl--get-federated-timeline + "N" 'mastodon-notifications--timeline)) + (use-package langtool) (use-package qrencode)