aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Shoshin Shangreaux <shoshin@cicadas.surf>2023-12-07 17:21:27 -0600
committerGrant Shoshin Shangreaux <shoshin@cicadas.surf>2023-12-07 17:21:27 -0600
commita2e524d264a1495fda4347995daf9dbd247bbb4f (patch)
treed6cd9607e0d670e40c704caeae4dbbfe03ac3c4d
parented1389edf19df481140c4f99f19739f758786a28 (diff)
Add: Emacs 29, treesit, dirvish, many melpa thingsmelpa
-rw-r--r--shoshimacs.org82
1 files changed, 78 insertions, 4 deletions
diff --git a/shoshimacs.org b/shoshimacs.org
index 582b971..a867fb6 100644
--- a/shoshimacs.org
+++ b/shoshimacs.org
@@ -817,6 +817,51 @@ from them in various Emacs menus. [[*\[\[info:consult#Top\]\[consult\]\] - Consu
:PROPERTIES:
:header-args:emacs-lisp: :noweb-ref programming :noweb-sep "\n\n" :results silent
:END:
+** Tree-sitter :emacs29:
+
+Mickey Peterson has a great article about getting started here.
+
+https://www.masteringemacs.org/article/how-to-get-started-tree-sitter
+
+*** Language grammars
+#+begin_src emacs-lisp
+ (setq treesit-language-source-alist
+ '((bash "https://github.com/tree-sitter/tree-sitter-bash")
+ (css "https://github.com/tree-sitter/tree-sitter-css")
+ (elisp "https://github.com/Wilfred/tree-sitter-elisp")
+ (html "https://github.com/tree-sitter/tree-sitter-html")
+ (javascript "https://github.com/tree-sitter/tree-sitter-javascript" "master" "src")
+ (json "https://github.com/tree-sitter/tree-sitter-json")
+ (make "https://github.com/alemuller/tree-sitter-make")
+ (markdown "https://github.com/ikatyang/tree-sitter-markdown")
+ (yaml "https://github.com/ikatyang/tree-sitter-yaml")))
+#+end_src
+
+Run the following to install all the grammars in the list:
+
+#+begin_src emacs-lisp :tangle no
+ (mapc #'treesit-install-language-grammar (mapcar #'car treesit-language-source-alist))
+#+end_src
+
+*** TODO TS-Modes
+
+This is the quickest way to use the specific tree-sitter modes, though
+it is a bit of a hack. It would be nice to have a toggle back and forth
+in case something causes a problem.
+
+#+begin_src emacs-lisp
+ (setq major-mode-remap-alist
+ '((yaml-mode . yaml-ts-mode)
+ (bash-mode . bash-ts-mode)
+ (js2-mode . js-ts-mode)
+ (json-mode . json-ts-mode)
+ (css-mode . css-ts-mode)
+ (ruby-mode . ruby-ts-mode)))
+#+end_src
+
+When adding hooks in this config, I will try to use the =<lang>-base-mode= which
+both inherit from. This way the hooks will apply either way.
+
** Common Lisp
I primarily use SBCL, so I set it as the ~inferior-lisp-program~
@@ -878,6 +923,9 @@ Company backend for slime
#+begin_src emacs-lisp
(package-install 'slime-company)
+ (require 'slime-company)
+ (setq slime-company-completion 'fuzzy
+ slime-company-display-arglist 1)
#+end_src
***** COMMENT Manual install
@@ -914,7 +962,8 @@ Company backend for slime
slime-quicklisp
))
- (slime-setup)
+ (with-eval-after-load 'slime
+ (slime-setup))
#+end_src
Slime Presentations
@@ -947,7 +996,7 @@ a bit. A few config variables are available, primarily for rubocop.
ruby-rubocop-config ".rubocop.yml"
#+begin_src emacs-lisp
- (add-hook 'ruby-mode-hook #'flymake-mode)
+ (add-hook 'ruby-base-mode-hook #'flymake-mode)
#+end_src
*** inf-ruby
@@ -971,7 +1020,7 @@ I prefer pry when its available, and it generally is on my system:
automatically inserts ~end~ in ruby mode for blocks that need it. conflicts/doubles
with smartparens, so its currently off.
-#+begin_src
+#+begin_src emacs-lisp
(package-install 'ruby-end)
#+end_src
@@ -1117,6 +1166,14 @@ Emacs MultiMedia System.
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
#+end_src
+** dired
+*** dirvish
+
+#+begin_src emacs-lisp
+ (package-install 'dirvish)
+ (dirvish-override-dired-mode)
+#+end_src
+
* External Services
:PROPERTIES:
:header-args:emacs-lisp: :noweb-ref external-services :noweb-sep "\n\n" :results silent
@@ -1204,6 +1261,21 @@ an API token is stored in my ~.authinfo~ file.
(package-install-file (file-name-concat restclient-dir "restclient.el"))
#+end_src
+** heroku
+
+Heroku client for Emacs, quick and efficient like Magit (thanks for the transient)!
+It allows you to manage your Heroku apps right from within Emacs: view and tail
+logs, edit environment variables, restart and destroy dynos etc.
+
+Main entry point is `heroku-list', once it's open press `?' to see available
+
+Requires Heroku CLI to be installed.
+
+#+begin_src emacs-lisp
+ (package-install 'heroku)
+ (require 'heroku)
+#+end_src
+
* UI/UX
:PROPERTIES:
:header-args:emacs-lisp: :noweb-ref user-interface :noweb-sep "\n\n" :results silent
@@ -1309,7 +1381,7 @@ not there. then i can ~mapc~ #'package-install over the list of themes.
#+begin_src emacs-lisp :noweb-ref defvars
(defvar my-themes-to-install
- '(cyberpunk-theme dracula-theme ef-themes kaolin-themes)
+ '(cyberpunk-theme dracula-theme ef-themes kaolin-themes modus-themes)
"List of themes to install when loading shoshimacs config.")
#+end_src
@@ -1437,6 +1509,7 @@ on the left/right side of the buffer window.
#+begin_src emacs-lisp
(package-install 'sideline)
+ (setq sideline-backends-left '(sideline-flymake))
#+end_src
*** sideline-flymake
@@ -1453,3 +1526,4 @@ Adds flymake messages to the sideline UI.
#+begin_src emacs-lisp :var buffer=(current-buffer)
(interactive "P\nbbuffer: ")
#+end_src
+