aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shoshimacs.el111
-rw-r--r--shoshimacs.org102
2 files changed, 86 insertions, 127 deletions
diff --git a/shoshimacs.el b/shoshimacs.el
index b3071e6..76741d3 100644
--- a/shoshimacs.el
+++ b/shoshimacs.el
@@ -25,7 +25,7 @@
(string-trim (with-temp-buffer (shell-command "hostname" t) (buffer-string))))
(defvar my-themes-to-install
- '(cyberpunk-theme dracula-theme nano-theme ef-themes)
+ '(cyberpunk-theme dracula-theme ef-themes kaolin-themes)
"List of themes to install when loading shoshimacs config.")
(defvar my-chosen-themes
@@ -37,8 +37,7 @@
"List of themes I prefer for narrowing and random selection.")
;;; Package Management
-(when (< emacs-major-version 28)
- (add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/")))
+(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(package-refresh-contents) ;; this will make internet requests on start up
@@ -134,12 +133,15 @@
(define-key vertico-map (kbd "M-DEL") #'vertico-directory-delete-word)
(define-key vertico-map (kbd "M-j") #'vertico-quick-insert)
-(package-install 'company)
+(package-install 'corfu)
+(setq corfu-auto t
+ corfu-cycle t
+ corfu-quit-no-match t)
+(global-corfu-mode t)
-(setq company-minimum-prefix-length 2
- company-idle-delay 0.3) ;; default is 0.2
-
-(add-hook 'after-init-hook 'global-company-mode)
+(package-install 'corfu-terminal)
+(unless (display-graphic-p)
+ (corfu-terminal-mode +1))
(package-install 'which-key)
(which-key-mode)
@@ -153,6 +155,7 @@
(package-install 'markdown-mode)
+(setq org-directory "~/org")
(setq org-default-notes-file (concat org-directory "/notes.org"))
(setq org-capture-templates
@@ -197,56 +200,7 @@
;;; Programming
(setq inferior-lisp-program "sbcl")
-(defvar slime-repo "https://github.com/slime/slime")
-(defvar slime-src-dir (expand-file-name "~/src/slime/"))
-
-(unless (file-directory-p slime-src-dir)
- (shell-command
- (format "git clone %s %s" slime-repo slime-src-dir)))
-
-(add-to-list 'load-path slime-src-dir)
-(require 'slime-autoloads)
-
-(let ((default-directory (concat slime-src-dir "doc/"))
- (buf (get-buffer-create "*slime-make-info*")))
- (unless (file-exists-p "slime.info")
- (shell-command "make clean" "*slime-make-info*")
- (shell-command "make slime.info" "*slime-make-info*")))
-
-(defvar slime-company-repo "https://github.com/anwyn/slime-company")
-(defvar slime-company-src-dir (expand-file-name "~/src/slime-company/"))
-
-(unless (file-directory-p slime-company-src-dir)
- (shell-command
- (format "git clone %s %s" slime-company-repo slime-company-src-dir)))
-
-(add-to-list 'load-path slime-company-src-dir)
-(setq slime-company-completion 'fuzzy
- slime-company-display-arglist 1)
-
-(setq slime-contribs
- '(
- slime-fancy ;; default value, includes many fundamental contribs
- slime-company
- slime-mrepl
- inferior-slime
- slime-fuzzy
- slime-asdf
- slime-banner
- slime-presentations
- slime-xref-browser
- slime-highlight-edits
- slime-quicklisp
- ))
-
-(slime-setup)
-
-(defun my-slime-return (_)
- "Function to advise `slime-repl-return' to make <RET> inspect the presentation at point."
- (when (slime-presentation-around-or-before-point-p)
- (slime-inspect-presentation-at-point (point))))
-
-(advice-add 'slime-repl-return :before #'my-slime-return)
+(package-install 'sly)
(package-install 'json-mode)
@@ -257,15 +211,7 @@
(when (executable-find "pry")
(setq inf-ruby-default-implementation "pry"))
-(defvar minitest-emacs-repo "https://github.com/arthurnn/minitest-emacs.git")
-(defvar minitest-emacs-src-dir "~/src/minitest-emacs")
-
-(unless (file-directory-p minitest-emacs-src-dir)
- (shell-command
- (format "git clone %s %s" minitest-emacs-repo minitest-emacs-src-dir)))
-
-(add-to-list 'load-path minitest-emacs-src-dir)
-(require 'minitest)
+(package-install 'minitest)
(package-install 'haml-mode)
@@ -275,15 +221,7 @@
(define-key flymake-mode-map (kbd "M-n") 'flymake-goto-next-error)
(define-key flymake-mode-map (kbd "M-p") 'flymake-goto-prev-error))
-(defvar plantuml-mode-repo "https://github.com/skuro/plantuml-mode")
-(defvar plantuml-mode-src-dir "~/src/plantuml-mode")
-
-(unless (file-directory-p plantuml-mode-src-dir)
- (shell-command
- (format "git clone %s %s" plantuml-mode-repo plantuml-mode-src-dir)))
-
-(add-to-list 'load-path plantuml-mode-src-dir)
-(require 'plantuml-mode)
+(package-install 'plantuml-mode)
(customize-set-value 'plantuml-default-exec-mode 'executable)
;;; Projects
@@ -335,15 +273,7 @@
(kill-new url)
(message "Pasted to %s (on kill ring)" url))))
-(defvar restclient-repo "https://github.com/pashky/restclient.el.git")
-(defvar restclient-dir "~/src/restclient.el")
-
-(unless (file-directory-p restclient-dir)
- (shell-command
- (format "git clone %s %s" restclient-repo restclient-dir)))
-
-(add-to-list 'load-path restclient-dir)
-(require 'restclient)
+(package-install 'restclient)
;;; User Interface
(when (display-graphic-p)
@@ -363,17 +293,6 @@
(mapc #'package-install my-themes-to-install)
-(defvar emacs-kaolin-repo "https://github.com/ogdenwebb/emacs-kaolin-themes")
-(defvar emacs-kaolin-src-dir (expand-file-name "~/src/emacs-kaolin/"))
-
-(unless (file-directory-p emacs-kaolin-src-dir)
- (shell-command
- (format "git clone %s %s" emacs-kaolin-repo emacs-kaolin-src-dir)))
-
-(add-to-list 'load-path emacs-kaolin-src-dir)
-
-(require 'kaolin-themes)
-
(package-install 'autothemer)
(setq telephone-line-lhs
diff --git a/shoshimacs.org b/shoshimacs.org
index 9bf00c4..4402338 100644
--- a/shoshimacs.org
+++ b/shoshimacs.org
@@ -139,12 +139,27 @@ like straight is having all of the packages' source code cloned into
local repos on your machine. This makes it easier to fix bugs and make
contributions to the packages you're using.
+** MELPA
+
+This is one of the primary community archives. It is very exhaustive, primarily
+because it has been the easiest place to add packages. On the other hand, it
+is not hosted on a libre platform, though that could change in the future.
+Ever since I've started using Emacs over a decade ago, adding MELPA to the
+package archive list was one of the very first things to do. I'm coming
+back "full-circle" to use it again in this config after finally getting tired
+of needing to add/manage certain libraries manually that I could just get
+through the package manager.
+
+#+begin_src emacs-lisp
+ (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
+#+end_src
+
+** COMMENT ELPA and Non-GNU ELPA
+
This configuration will stick to packages available through the built-in
~package.el~ system. As of Emacs 28, this is everything in the ELPA and
non-gnu ELPA package repositories.
-** ELPA and Non-GNU ELPA
-
ELPA packages have their copyright assigned to the FSF, which is a requirement
for any code to be included into Emacs itself. ELPA packages are thus the
most likely to be merged into Emacs as a new feature. Some, like EMMS, are
@@ -545,7 +560,7 @@ this is implemented with the ~vertico-directory~ extension.
(define-key vertico-map (kbd "M-j") #'vertico-quick-insert)
#+end_src
-** COMMENT corfu
+** corfu
#+begin_src emacs-lisp
(package-install 'corfu)
@@ -562,7 +577,7 @@ this is implemented with the ~vertico-directory~ extension.
(unless (display-graphic-p)
(corfu-terminal-mode +1))
#+end_src
-** company - complete anywhere
+** COMMENT company - complete anywhere
Company is a modular completion framework. Modules for retrieving completion
candidates are called backends, modules for displaying them are frontends.
@@ -584,7 +599,6 @@ company-mode RET).
#+end_src
-
** which-key
which-key is an excellent package that helps provide guide posts for command
@@ -649,13 +663,14 @@ Org capture is a way to quickly get entries from various places into one of your
org files.
#+begin_src emacs-lisp
+ (setq org-directory "~/org")
(setq org-default-notes-file (concat org-directory "/notes.org"))
(setq org-capture-templates
`(("p" "Protocol" entry (file+headline ,org-default-notes-file "Inbox")
- "* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")
+ "* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")
("L" "Protocol Link" entry (file+headline ,org-default-notes-file "Inbox")
- "* %? [[%:link][%:description]] \nCaptured On: %U")))
+ "* %? [[%:link][%:description]] \nCaptured On: %U")))
#+end_src
*** refile
@@ -764,13 +779,13 @@ I primarily use SBCL, so I set it as the ~inferior-lisp-program~
(setq inferior-lisp-program "sbcl")
#+end_src
-*** COMMENT SLY
+*** SLY
#+begin_src emacs-lisp
(package-install 'sly)
#+end_src
-*** Slime
+*** COMMENT Slime
The ~slime~ package v2.26.1 in the nongnu repo seems to have an issue with
emacs 28.1 (?) so I'm installing it from source.
@@ -784,7 +799,7 @@ emacs 28.1 (?) so I'm installing it from source.
(format "git clone %s %s" slime-repo slime-src-dir)))
(add-to-list 'load-path slime-src-dir)
- (require 'slime-autoloads)
+ (package-install-file slime-src-dir)
#+end_src
There is a command ~slime-info~ to read the locally built manual file,
@@ -802,6 +817,11 @@ but i need to ensure it is built:
Company backend for slime
+#+begin_src shell
+ (package-install 'slime-company)
+#+end_src
+
+***** Manual install
#+begin_src emacs-lisp
(defvar slime-company-repo "https://github.com/anwyn/slime-company")
(defvar slime-company-src-dir (expand-file-name "~/src/slime-company/"))
@@ -811,6 +831,7 @@ Company backend for slime
(format "git clone %s %s" slime-company-repo slime-company-src-dir)))
(add-to-list 'load-path slime-company-src-dir)
+ (packag-install-file slime-company-src-dir)
(setq slime-company-completion 'fuzzy
slime-company-display-arglist 1)
#+end_src
@@ -895,10 +916,17 @@ with smartparens, so its currently off.
(package-install 'ruby-end)
#+end_src
-*** TODO minitest-emacs
+*** TODO minitest
+
+this is a package i happen to maintain, and i would like to get it into non-gnu elpa.
+
+#+begin_src emacs-lisp
+ (package-install 'minitest)
+#+end_src
+
+**** COMMENT Manual install
-this is a package i happen to maintain, and i would like to get it into non-gnu
-elpa. however, at the moment i must install from source:
+however, at the moment i must install from source:
#+begin_src emacs-lisp
(defvar minitest-emacs-repo "https://github.com/arthurnn/minitest-emacs.git")
@@ -909,7 +937,7 @@ elpa. however, at the moment i must install from source:
(format "git clone %s %s" minitest-emacs-repo minitest-emacs-src-dir)))
(add-to-list 'load-path minitest-emacs-src-dir)
- (require 'minitest)
+ (require 'minitest-emacs)
#+end_src
*** haml mode
@@ -934,6 +962,12 @@ elpa. however, at the moment i must install from source:
** PlantUML
#+begin_src emacs-lisp
+ (package-install 'plantuml-mode)
+ (customize-set-value 'plantuml-default-exec-mode 'executable)
+#+end_src
+
+*** COMMENT Manual install
+#+begin_src emacs-lisp
(defvar plantuml-mode-repo "https://github.com/skuro/plantuml-mode")
(defvar plantuml-mode-src-dir "~/src/plantuml-mode")
@@ -988,6 +1022,7 @@ its the best! 🪄
Emacs MultiMedia System.
#+begin_src emacs-lisp
+ (package-install 'emms)
(require 'emms-setup)
(emms-all)
(setq emms-player-list '(emms-player-mpv))
@@ -1091,6 +1126,11 @@ an API token is stored in my ~.authinfo~ file.
** restclient
#+begin_src emacs-lisp
+ (package-install 'restclient)
+#+end_src
+
+*** COMMENT manual install
+#+begin_src emacs-lisp
(defvar restclient-repo "https://github.com/pashky/restclient.el.git")
(defvar restclient-dir "~/src/restclient.el")
@@ -1099,7 +1139,7 @@ an API token is stored in my ~.authinfo~ file.
(format "git clone %s %s" restclient-repo restclient-dir)))
(add-to-list 'load-path restclient-dir)
- (require 'restclient)
+ (package-install-file (file-name-concat restclient-dir "restclient.el"))
#+end_src
* UI
@@ -1207,7 +1247,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 nano-theme ef-themes)
+ '(cyberpunk-theme dracula-theme ef-themes kaolin-themes)
"List of themes to install when loading shoshimacs config.")
#+end_src
@@ -1215,7 +1255,7 @@ not there. then i can ~mapc~ #'package-install over the list of themes.
(mapc #'package-install my-themes-to-install)
#+end_src
-*** kaolin themes
+*** COMMENT kaolin themes manual install
#+name: install-emacs-kaolin
#+begin_src emacs-lisp
@@ -1227,8 +1267,7 @@ not there. then i can ~mapc~ #'package-install over the list of themes.
(format "git clone %s %s" emacs-kaolin-repo emacs-kaolin-src-dir)))
(add-to-list 'load-path emacs-kaolin-src-dir)
-
- (require 'kaolin-themes)
+ (package-install-file emacs-kaolin-src-dir)
#+end_src
*** chosen theme list and random loading on init
@@ -1261,19 +1300,20 @@ for theme development.
*** telephone line
#+begin_src emacs-lisp
+ (package-install 'telephone-line)
(setq telephone-line-lhs
- '((evil . (telephone-line-evil-tag-segment))
- (accent . (telephone-line-vc-segment
- telephone-line-erc-modified-channels-segment
- telephone-line-process-segment))
- (nil . (
- ;; telephone-line-minor-mode-segment
- telephone-line-buffer-segment))))
+ '((evil . (telephone-line-evil-tag-segment))
+ (accent . (telephone-line-vc-segment
+ telephone-line-erc-modified-channels-segment
+ telephone-line-process-segment))
+ (nil . (
+ ;; telephone-line-minor-mode-segment
+ telephone-line-buffer-segment))))
(setq telephone-line-rhs
- '((nil . (telephone-line-misc-info-segment
- telephone-line-flymake-segment))
- (accent . (telephone-line-major-mode-segment))
- (evil . (telephone-line-airline-position-segment))))
+ '((nil . (telephone-line-misc-info-segment
+ telephone-line-flymake-segment))
+ (accent . (telephone-line-major-mode-segment))
+ (evil . (telephone-line-airline-position-segment))))
(telephone-line-mode t)
(set-face-background 'telephone-line-evil-normal "deep pink")
@@ -1299,7 +1339,7 @@ Saves to a temp file and puts the filename in the kill ring."
#+begin_src emacs-lisp
(package-install 'windresize)
-#+end_src
+#+en
* COMMENT scratch