diff --git a/.emacs.d/init.el b/.emacs.d/init.el index d1c03ed..1233bf8 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -2047,6 +2047,47 @@ _r_: Restart frame _uo_: Output _sd_: Down stack frame _bh_: Set (car (find-file-read-args "Directory: " t))) (display-buffer my/tensorboard-buffer)) +(use-package json-mode + :straight t + :mode "\\.json\\'" + :config + (add-hook 'json-mode #'smartparens-mode) + (add-hook 'json-mode #'hs-minor-mode) + (my/set-smartparens-indent 'json-mode)) + +(use-package csv-mode + :straight t + :mode "\\.csv\\'") + +(use-package yaml-mode + :straight t + :mode "\\.yml\\'" + :config + (add-hook 'yaml-mode-hook 'smartparens-mode) + (add-hook 'yaml-mode-hook 'highlight-indent-guides-mode) + (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))) + +(use-package dotenv-mode + :straight t + :mode "\\.env\\..*\\'") + +(use-package dockerfile-mode + :mode "Dockerfile\\'" + :straight t + :config + (add-hook 'dockerfile-mode 'smartparens-mode)) + +(use-package crontab-mode + :straight t) + +(add-hook 'sh-mode-hook #'smartparens-mode) + +(use-package fish-mode + :straight t + :mode "\\.fish\\'" + :config + (add-hook 'fish-mode-hook #'smartparens-mode)) + (use-package lsp-java :straight t :after (lsp) @@ -2081,14 +2122,6 @@ _r_: Restart frame _uo_: Output _sd_: Down stack frame _bh_: Set :config (add-hook 'csproj-mode #'smartparens-mode)) -(use-package fish-mode - :straight t - :mode "\\.fish\\'" - :config - (add-hook 'fish-mode-hook #'smartparens-mode)) - -(add-hook 'sh-mode-hook #'smartparens-mode) - (use-package haskell-mode :straight t :mode "\\.hs\\'") @@ -2104,14 +2137,6 @@ _r_: Restart frame _uo_: Output _sd_: Down stack frame _bh_: Set (my/set-smartparens-indent 'lua-mode) -(use-package json-mode - :straight t - :mode "\\.json\\'" - :config - (add-hook 'json-mode #'smartparens-mode) - (add-hook 'json-mode #'hs-minor-mode) - (my/set-smartparens-indent 'json-mode)) - (setq my/sqlformatter-dialect-choice '("db2" "mariadb" "mysql" "n1ql" "plsql" "postgresql" "redshift" "spark" "sql" "tsql")) @@ -2134,31 +2159,6 @@ _r_: Restart frame _uo_: Output _sd_: Down stack frame _bh_: Set (use-package sparql-mode :straight t) -(use-package yaml-mode - :straight t - :mode "\\.yml\\'" - :config - (add-hook 'yaml-mode-hook 'smartparens-mode) - (add-hook 'yaml-mode-hook 'highlight-indent-guides-mode) - (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))) - -(use-package dotenv-mode - :straight t - :mode "\\.env\\..*\\'") - -(use-package csv-mode - :straight t - :mode "\\.csv\\'") - -(use-package dockerfile-mode - :mode "Dockerfile\\'" - :straight t - :config - (add-hook 'dockerfile-mode 'smartparens-mode)) - -(use-package crontab-mode - :straight t) - (use-package org :straight t :if (not my/remote-server) diff --git a/Console.org b/Console.org index ca1bf93..3154ba9 100644 --- a/Console.org +++ b/Console.org @@ -407,7 +407,7 @@ if [[ ! -z "$INIT_CONDA" ]]; then init_conda fi #+end_src -*** Starship prompt +*** Starship #+begin_src bash if [[ -z "$SIMPLE" ]]; then eval "$(starship init bash)" diff --git a/Emacs.org b/Emacs.org index 78538b6..3dea28a 100644 --- a/Emacs.org +++ b/Emacs.org @@ -1829,7 +1829,7 @@ Copy the current buffer to a perspective and switch to it. (switch-to-buffer buffer))) #+end_src -Switch to perspective buffer in other window. +Switch to a perspective buffer in other window. #+begin_src emacs-lisp (defun my/persp-ivy-switch-buffer-other-window (arg) (interactive "P") @@ -2704,7 +2704,7 @@ Section snippets. The code turned out to be more complicated than just writing t 'latex-mode my/latex-section-snippets) #+end_src -** Other markup languages +** Other markup & natural languages *** Markdown #+begin_src emacs-lisp (use-package markdown-mode @@ -2786,7 +2786,8 @@ References: "l" 'langtool-correct-buffer) #+end_src ** Lisp -These are your father's parentheses. Elegant weapons for a more... civilized age. +[[./dot-imgs/lisp_cycles.png]] + *** Meta Lisp Some packages for editing various Lisps. #+begin_src emacs-lisp @@ -3092,6 +3093,66 @@ A function to start up [[https://www.tensorflow.org/tensorboard][TensorBoard]]. (car (find-file-read-args "Directory: " t))) (display-buffer my/tensorboard-buffer)) #+end_src +** Data serialization +*** JSON +#+begin_src emacs-lisp +(use-package json-mode + :straight t + :mode "\\.json\\'" + :config + (add-hook 'json-mode #'smartparens-mode) + (add-hook 'json-mode #'hs-minor-mode) + (my/set-smartparens-indent 'json-mode)) +#+end_src +*** CSV +#+begin_src emacs-lisp +(use-package csv-mode + :straight t + :mode "\\.csv\\'") +#+end_src +*** YAML +#+begin_src emacs-lisp +(use-package yaml-mode + :straight t + :mode "\\.yml\\'" + :config + (add-hook 'yaml-mode-hook 'smartparens-mode) + (add-hook 'yaml-mode-hook 'highlight-indent-guides-mode) + (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))) +#+end_src +** Configuration +*** .env +#+begin_src emacs-lisp +(use-package dotenv-mode + :straight t + :mode "\\.env\\..*\\'") +#+end_src +*** Docker +#+begin_src emacs-lisp +(use-package dockerfile-mode + :mode "Dockerfile\\'" + :straight t + :config + (add-hook 'dockerfile-mode 'smartparens-mode)) +#+end_src +*** crontab +#+begin_src emacs-lisp +(use-package crontab-mode + :straight t) +#+end_src +** Shell +*** sh +#+begin_src emacs-lisp +(add-hook 'sh-mode-hook #'smartparens-mode) +#+end_src +*** fish +#+begin_src emacs-lisp +(use-package fish-mode + :straight t + :mode "\\.fish\\'" + :config + (add-hook 'fish-mode-hook #'smartparens-mode)) +#+end_src ** Java #+begin_src emacs-lisp (use-package lsp-java @@ -3140,18 +3201,6 @@ A function to start up [[https://www.tensorflow.org/tensorboard][TensorBoard]]. :config (add-hook 'csproj-mode #'smartparens-mode)) #+end_src -** fish -#+begin_src emacs-lisp -(use-package fish-mode - :straight t - :mode "\\.fish\\'" - :config - (add-hook 'fish-mode-hook #'smartparens-mode)) -#+end_src -** sh -#+begin_src emacs-lisp -(add-hook 'sh-mode-hook #'smartparens-mode) -#+end_src ** Haskell #+begin_src emacs-lisp (use-package haskell-mode @@ -3171,16 +3220,6 @@ A function to start up [[https://www.tensorflow.org/tensorboard][TensorBoard]]. (my/set-smartparens-indent 'lua-mode) #+end_src -** JSON -#+begin_src emacs-lisp -(use-package json-mode - :straight t - :mode "\\.json\\'" - :config - (add-hook 'json-mode #'smartparens-mode) - (add-hook 'json-mode #'hs-minor-mode) - (my/set-smartparens-indent 'json-mode)) -#+end_src ** SQL [[https://github.com/zeroturnaround/sql-formatter][sql-formatter]] is a nice JavaScript package for pretty-printing SQL queries. It is not packaged for Emacs, so the easiest way to use it seems to be to define a custom formatter via [[https://github.com/purcell/emacs-reformatter][reformatter]]. @@ -3213,41 +3252,6 @@ So far I didn't find a nice SQL client for Emacs, but I occasionally run SQL que (use-package sparql-mode :straight t) #+end_src -** YAML -#+begin_src emacs-lisp -(use-package yaml-mode - :straight t - :mode "\\.yml\\'" - :config - (add-hook 'yaml-mode-hook 'smartparens-mode) - (add-hook 'yaml-mode-hook 'highlight-indent-guides-mode) - (add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))) -#+end_src -** .env -#+begin_src emacs-lisp -(use-package dotenv-mode - :straight t - :mode "\\.env\\..*\\'") -#+end_src -** CSV -#+begin_src emacs-lisp -(use-package csv-mode - :straight t - :mode "\\.csv\\'") -#+end_src -** Docker -#+begin_src emacs-lisp -(use-package dockerfile-mode - :mode "Dockerfile\\'" - :straight t - :config - (add-hook 'dockerfile-mode 'smartparens-mode)) -#+end_src -** crontab -#+begin_src emacs-lisp -(use-package crontab-mode - :straight t) -#+end_src * Org Mode The best feature of Emacs. Just after every other best feature of Emacs, probably. diff --git a/README.org b/README.org index 910e12b..41194d2 100644 --- a/README.org +++ b/README.org @@ -11,57 +11,25 @@ The files themselves are managed and deployed via [[https://yadm.io/][yadm]], bu My current GNU/Linux distribution is [[https://guix.gnu.org/][GNU Guix]]. In the context of this repo, Guix allows me to list all the used programs in manifests, which means I have the same set of programs across multiple machines. Look for tables with "Guix dependency" in the header. -Literate configuration files: +Table of contents and software: - [[file:Emacs.org][Emacs.org]] + - [[file:Emacs.org][GNU Emacs]] - [[file:Desktop.org][Desktop.org]] + - /Active/: [[file:Desktop.org::*EXWM][EXWM]], [[file:Desktop.org::*Polybar][Polybar]], [[file:Desktop.org::*Rofi][Rofi]], [[file:Desktop.org::*Flameshot][Flameshot]], [[file:Desktop.org::*dunst][dunst]], [[file:Desktop.org::*Picom][Picom]], [[file:Desktop.org::*Zathura][Zathura]] + - /In Limbo/: [[file:Desktop.org::*i3wm][i3wm]], [[file:Desktop.org::*keynav][keynav]] - [[file:Console.org][Console.org]] + - /Active/: [[file:Console.org::*=.profile=][.profile]], [[file:Console.org::*Bash][Bash]], [[file:Console.org::*Fish][Fish]], [[file:Console.org::*Starship prompt][Starship]], [[file:Console.org::*Tmux][Tmux]], [[file:Console.org::*Alacritty][Alacritty]] + - /In Limbo/: [[file:Console.org::*Nushell][Nushell]] - [[file:Guix.org][Guix.org]] - [[file:Mail.org][Mail.org]] - -* Programs used -Some of the notable programs are listed in the table below. - -| Group | Program | Purpose | Status | Documented? | Notes | -|-----------+-------------+-----------------------------+-------------------+----------------+-----------------------------------------------------------| -| console | bash | shell | launches fish :) | [[file:Console.org::*Bash][Console.org]] | | -| console | [[https://fishshell.com/][fish]] | shell | *active* | [[file:Console.org::*Fish][Console.org]] | | -| console | [[https://github.com/starship/starship][starship]] | prompt | *active* | [[file:Console.org::*Starship][Console.org]] | | -| console | [[https://github.com/tmux/tmux][tmux]] | terminal multiplexer | *active* | [[file:Console.org::*Tmux][Console.org]] | | -| console | [[https://github.com/alacritty/alacritty][alacritty]] | terminal emulator | *active* | [[file:Console.org::*Alacritty][Console.org]] | | -| mail | [[https://notmuchmail.org/][notmuch]] | mail indexer | *active* | [[file:Mail.org][Mail.org,]] [[https://sqrtminusone.xyz/posts/2021-02-27-gmail/][post]] | | -| mail | [[https://github.com/gauteh/lieer][lieer]] | gmail API client | *active* | [[file:Mail.org][Mail.org]], [[https://sqrtminusone.xyz/posts/2021-02-27-gmail/][post]] | credentials are encrypted | -| mail | [[https://marlam.de/msmtp/][msmtp]] | SMTP client | *active* | [[file:Mail.org][Mail.org]] | | -| editor | [[https://www.gnu.org/software/emacs/][emacs]] | everything | *active* | [[file:Emacs.org][Emacs.org]] | GitHub renders .org files without labels and =tangle: no= | -| editor | [[https://www.vim.org/][vim]] | text edtior | *active* | - | A minimal config to have a lightweight terminal $EDITOR | -| editor | [[https://neovim.io/][neovim]] | text edtior | archive | - | | -| documents | [[https://mg.readthedocs.io/latexmk.html][latexmk]] | LaTeX build tool | *active* | - | | -| documents | [[https://pwmt.org/projects/zathura/][zathura]] | pdf viewer | *active* | [[file:Desktop.org::*dunst][Desktop.org]] | | -| desktop | [[https://github.com/dunst-project/dunst][dunst]] | notification manager | *active* | [[file:Desktop.org::*dunst][Desktop.org]] | | -| desktop | [[https://i3wm.org/][i3wm]] | tiling WM | *active* | [[file:Desktop.org::*i3wm][Desktop.org]] | | -| desktop | [[https://github.com/jordansissel/keynav][keynav]] | control mouse with keyboard | *active* | [[file:Desktop.org::*keynav][Desktop.org]] | | -| desktop | [[https://github.com/polybar/polybar][polybar]] | status bar | *active* | [[file:Desktop.org::*Polybar][Desktop.org]] | | -| desktop | [[https://github.com/davatorium/rofi][rofi]] | generic menu | *active* | [[file:Desktop.org::*Rofi][Desktop.org]] | | -| desktop | [[https://github.com/flameshot-org/flameshot][flameshot]] | screenshot | *active* | [[file:Desktop.org::Flameshot][Desktop.org]] | | -| desktop | [[https://github.com/yshui/picom][picom]] | X11 compositor | *active* | [[file:Desktop.org::*Picom][Desktop.org]] | | -| desktop | [[https://github.com/vivien/i3blocks][i3blocks]] | status bar | archive | - | | -| internet | [[https://github.com/tridactyl/tridactyl][tridactyl]] | vim bindings for Firefox | *active* | - | templated with yadm | -| internet | [[https://newsboat.org/][newsboat]] | terminal RSS reader | archive | - | urls are encrypted | -| internet | [[https://qutebrowser.org/][qutebrowser]] | browser with vim bindings | archive | - | | -| internet | [[https://github.com/jarun/buku][buku]] | bookmarks manager | archive | - | | -| audio | [[https://www.musicpd.org/][mpd]] | music player daemon | *active* | - | | -| audio | [[https://github.com/ncmpcpp/ncmpcpp][ncmpcpp]] | MPD frontend | *active* | - | | -| misc | [[https://yadm.io][yadm]] | dotfiles manager | *active* | - | | -| misc | [[https://github.com/risacher/sunwait][sunwait]] | sunrise calculator | *active* | - | | -| misc | [[https://github.com/vergoh/vnstat][vnstat]] | traffic stats | *active* | - | | - + - /Active/: [[file:Mail.org::*Lieer][Lieer]], [[file:Mail.org::*DavMail][DavMail]], [[file:Mail.org::*OfflineIMAP][OfflineIMAP]], [[file:Mail.org::*Notmuch][Notmuch]] * Posts about my configuration +- [[https://sqrtminusone.xyz/posts/2021-10-04-emacs-i3/][Getting a consistent set of keybindings between i3 and Emacs]] +- [[https://sqrtminusone.xyz/posts/2021-09-07-emms/][My EMMS and elfeed setup]] - [[https://sqrtminusone.xyz/posts/2021-05-01-org-python/][Replacing Jupyter Notebook with Org Mode]] - [[https://sqrtminusone.xyz/posts/2021-02-27-gmail/][Multiple Gmail accounts & labels with Emacs]] * Some statistics -If you are viewing the file in Emacs, eval the following to show the pictures with reasonable width: - -** History [[https://sqrtminusone.xyz/stats/all.png]] [[https://sqrtminusone.xyz/stats/emacs-vim.png]] diff --git a/dot-imgs/lisp_cycles.png b/dot-imgs/lisp_cycles.png new file mode 100644 index 0000000..e13ebce Binary files /dev/null and b/dot-imgs/lisp_cycles.png differ