diff --git a/index.html b/index.html index e0a7f5f..a8aba94 100644 --- a/index.html +++ b/index.html @@ -48,109 +48,109 @@
custom
interferencecustom
interferenceWelcome to my literate Emacs configuration. This setup, like many of its lineage, validates Newton's famous aphorism about standing on the shoulders of giants. @@ -171,9 +171,9 @@
The beauty of literate configuration with org-mode is that it allows for maintaining an Emacs config, a website, and an org-mode markup file at the same time. For example, in the header @@ -189,7 +189,7 @@
-Leveraging these options, I tangle (each time I save the file, refer to the org-mode hook)
+Leveraging these options, I tangle (each time I save the file, refer to the org-mode hook)
the source code blocks in this configuration to my Emacs init.el
, while also setting
up the ReadTheOrg theme utilized by the website. One nuance is the task of ensuring
syntax highlighting when exporting to HTML with org-mode
while using Emacs in batch mode.
@@ -199,9 +199,9 @@
While it's perfectly feasible to configure Emacs with Nix, my preference leans towards the Elisp configuration. Nonetheless, I've incorporated the following overlay in conjunction with Cachix to access the latest commits @@ -254,11 +254,11 @@
-To comply with the Emacs conventions for libraries, the tangled init.el
must have the following header and footer:
+To comply with the Emacs conventions for libraries, the tangled init.el
must have the following header and footer:
One of the cornerstones of any Emacs distribution is the package manager. Previously, I was mostly a happy user
of use-package
with the package.el
backend. However, I did find myself in the need of using a more recent
@@ -361,9 +361,9 @@
The typical caveat of using bleeding-edge software is the occasional need for manual fixes. Here, I introduce (hopefully) temporary workarounds to address issues in broken packages. @@ -397,9 +397,9 @@
Here I use the use-package
macro to keep all Emacs internal settings organized in one single block.
The variables have self-explanatory names, but I have added a few comments for the sake of clarity.
@@ -465,9 +465,9 @@
custom
interferencecustom
interferenceThis piece of code serves to reduce clutter and boost the reproducibility of the configuration.
@@ -484,9 +484,9 @@custom
This code ensures line highlighting is applied selectively, focusing solely on programming and text buffers.
@@ -502,9 +502,9 @@Discarding years of honed Vim muscle memory is not an option for me. Yet, I'm beginning to find that Emacs keybindings are starting to resonate, and in some major modes, employing Evil @@ -538,9 +538,9 @@
Embracing Emacs comes with its quirks, and the default undo system stands out as one that puzzles me. Perhaps one day, I'll unlock its full potential. For the time being, I opt for a linear approach. @@ -560,9 +560,9 @@
As Nietzsche said, the voice of beauty speaks softly; it creeps only into the most fully awakened souls. Ergo the importance of a visually pleasant editor. These are my top three themes: @@ -613,9 +613,9 @@
Another well-known issue of Emacs, although it rarely affects me.
@@ -630,9 +630,9 @@This helps a lot when lisping.
@@ -646,9 +646,9 @@Another eye candy. Parenthesis of different colors are very helpful in Lisp though.
@@ -662,9 +662,9 @@This package emulates the minimap feature found in Sublime Text within the realm of Emacs. Although I'm moderately content with this configuration, I haven't fully embraced its @@ -686,9 +686,9 @@
A precious contribution from the Doom Emacs community, boasting the finest mode line I've
encountered for Emacs. The supplementary package all-the-icons
augments this experience,
@@ -715,9 +715,9 @@
This intriguing package offers functionality for handling multiple cursors, although its ergonomics could, in my opinion, use some improvement. @@ -740,9 +740,9 @@
Tabs are not traditionally a part of the standard Emacs workflow, preferring buffer-switching instead. The following is a simple configuration @@ -763,9 +763,9 @@
This package ensures that some org-mode
babel exports have proper syntax highlighting.
The integration of Ivy and its auxiliary tools, Swiper and Counsel, greatly enhances my Emacs experience by providing an advanced incremental completion system. @@ -858,9 +858,9 @@
This powerful package comes with tons of features for jumping to visible text
using a char-based decision tree. I have a minimal configuration, as avy-goto-char-timer
@@ -876,9 +876,9 @@
Hydra is a package that simplifies the creation of keybinding combinations using a shared prefix. As a bonus, it also generates a menu displaying all potential commands: @@ -930,9 +930,9 @@
Which-key is an indispensable tool for charting the turbulent waters of Emacs' packages keybindings. These suggestions prove incredibly useful when venturing into the realm of a new package. @@ -952,9 +952,9 @@
While the default Emacs help system is commendable, Helpful elevates it to another level, introducing features such as syntax highlighting and source code exploration for a more intuitive and enriching experience. @@ -976,9 +976,9 @@
When navigating through large codebases, such as electronic structure packages, employing code tags
can save your fingers from the wear and tear induced by continuous grep
commands.
@@ -1009,9 +1009,9 @@
Emacs package to use the incremental parsing library tree-sitter.
@@ -1028,9 +1028,9 @@Source code completions. An all-time classic.
@@ -1050,9 +1050,9 @@
Microsoft's Language Server Protocol (LSP) is a great tool to provide IDE features to Emacs.
I use two major-modes for managing the lsp servers, namely lsp-mode
and eglot
.
@@ -1131,9 +1131,9 @@
The realgut
debugger is a complete rewriting of the Emacs GUD. It has support for several debuggers and has seamless
integration with GDB and PDB.
@@ -1157,9 +1157,9 @@
FlySpell does a lot out of the box, therefore I have a very basic config.
@@ -1177,9 +1177,9 @@This is a free and open-source multilingual grammar checker that supports more than thirty languages. A must-have if you write papers in LaTeX or org-mode. For the Emacs package to work one needs to install @@ -1214,9 +1214,9 @@
This package provides a potent translation tool integrated seamlessly with Emacs. It extends support to numerous translation engines including Google, Bing, and DeepL. My preference leans towards using pop-ups @@ -1249,9 +1249,9 @@
Flycheck is indeed a valuable asset in the toolkit, despite certain constraints. For instance, the persistent checking might negatively affect performance, @@ -1274,9 +1274,9 @@
Yasnippet offers a comprehensive collection of snippets complemented by an incredibly intuitive syntax. Its notable shortcoming, however, is the conspicuous absence of Scheme snippets. I've crafted custom snippets @@ -1344,9 +1344,9 @@
Emacs built-in ediff
is more powerful than vimdiff
IMHO.
However, the default configuration can be improved a bit:
@@ -1374,9 +1374,9 @@
For the times they are a-changin'. Large language models are here to stay, and as cliche as it might sound, they are the future. It comes then natural to have a nice Emacs package to query ChatGPT. @@ -1398,13 +1398,13 @@
This package uses a C library instead of Lisp to emulate the terminals. It is my favorite emulator currently. @@ -1497,9 +1497,9 @@
This is a command shell written purely in Emacs Lisp. While not being POSIX compliant, it is still a powerful tool for remote editing due to its native TRAMP support. Here I define @@ -1570,9 +1570,9 @@
TRAMP (Transparent Remote Access, Multiple Protocols) is an essential package in Emacs that simplifies remote file editing and management. Paired with Dired, TRAMP enables seamless editing of files on remote machines, saving you from the hassle of configuring your editor @@ -1603,9 +1603,9 @@
After trying a couple of file browsers I understood that all I needed was already there: dired
.
And because in the Emacs operating system we can do just about anything, I have added the shr-tag-pre-highlight
and shrface
packages, so eww
gets an org-mode
look and feel. This comes handy when comparing programming languages in Rosetta Code.
@@ -1758,9 +1758,9 @@
Software tinkerers tend to hang out on IRCs a lot, so this configuration is very useful to get help on those channels, and keeping in touch with friends. @@ -1776,9 +1776,9 @@
Another C Library, it works better than the default Emacs PDF viewer, for instance it allows hyperlinks.
@@ -1801,9 +1801,9 @@
For multimedia content I use emms
, a lightweight player written in Emacs Lisp, that integrates perfectly
with mpv
.
@@ -1843,27 +1843,27 @@
Here you can find my configuration for different programming languages. I will introduce it in a laconic manner, because this section is rather opinionated.
The language that gave birth to the "Maxwell equations of software". Lisp dialects are my favorite programming languages. Below I add a vague description of some of the things I like from them.
Enhance the overall lisp experience in Emacs with Lispy, and its evil friend Lispyville.
@@ -1883,9 +1883,9 @@Powerful compiler, great libraries and OOP features.
@@ -1905,9 +1905,9 @@Minimalism and elegant syntax, the purest. Hygienic macros. Racket has a great documentation, and scribble!
@@ -1932,9 +1932,9 @@Largest library ecosystem thanks to JVM, vectors and maps. Strong focus on functional programming.
@@ -1955,9 +1955,9 @@The youngest in this list, similar in spirit to Clojure, but translates to Python's AST.
@@ -1993,18 +1993,129 @@APL stands for A Programmin Language, make your own conclusions. It is an absolute joy to program in Iversonian array languages. Tacit and terse, less is more.
+An APL for your flying saucer: +
+ +(use-package bqn-mode + :straight t + :init + ;; Rudimentary org-babel support + (add-to-list 'org-babel-tangle-lang-exts '("bqn" . "bqn")) + (defun org-babel-expand-body:bqn (body params &optional processed-params) + "Expand BODY according to PARAMS, return the expanded body." + (require 'bqn-mode nil t) + (let ((vars (org-babel--get-vars (or + processed-params + (org-babel-process-params params))))) + (concat + (mapconcat + (lambda (pair) + (format "%s=%S" (car pair) (org-babel-bqn-var-to-bqn (cdr pair)))) + vars "\n") + "\n" body "\n"))) + (defun org-babel-execute:bqn (body params) + "Execute a block of BQN code with org-babel." + (message "Executing BQN source code block") + (bqn-comint-evaluate-command body)) + (defun org-babel-bqn-var-to-bqn (var) + "Convert an elisp var into a string of BQN." + (format "%S" var)) + (defun org-babel-bqn-initiate-session (&optional session) + "If there is not a current inferior-process-buffer in SESSION then create." + (unless (string= session "none") + (get-buffer-process (bqn-comint-buffer)))) + + ;; Some utilities + (defun toggle-bqn-keymap () + "Toggle the BQN keymap display." + (interactive) + (let ((buf (get-buffer "*BQN keymap*"))) + (if (and buf (get-buffer-window buf)) + (progn + (delete-window (get-buffer-window buf)) + (kill-buffer buf)) + (bqn-keymap-mode-show-keyboard)))) + (defun toggle-bqn-glyphs () + "Toggle the BQN glyphs display." + (interactive) + (let ((buf (get-buffer "*BQN Glyphs*"))) + (if (and buf (get-buffer-window buf)) + (progn + (delete-window (get-buffer-window buf)) + (kill-buffer buf)) + (bqn-glyph-mode-show-glyphs)))) + + ;; Too much color in BQN is not good + (defun disable-rainbow-delimiters-bqn () + (rainbow-delimiters-mode -1)) + + ;; And the default fontlock needs work + (defface bqn-function + '((t (:foreground "#3aa548"))) + "Face used for BQN functions." + :group 'bqn) + (defface bqn-one-modifier + '((t (:foreground "#93428b"))) + "Face used for BQN 1-modifiers." + :group 'bqn) + (defface bqn-two-modifier + '((t (:foreground "#998819"))) + "Face used for BQN 2-modifiers." + :group 'bqn) + (defface bqn-primitive-function + '((t (:foreground "#3aa548"))) + "Face used for primitive BQN functions." + :group 'bqn) + (defface bqn-primitive-one-modifier + '((t (:foreground "#93428b"))) + "Face used for primitive BQN 1-modifiers." + :group 'bqn) + (defface bqn-primitive-two-modifier + '((t (:foreground "#998819"))) + "Face used for primitive BQN 2-modifiers." + :group 'bqn) + (defun my-bqn-mode-custom-strings () + "Customize string face for BQN mode." + (set (make-local-variable 'font-lock-string-face) + '(:foreground "#ABB2BF"))) + + :bind (:map bqn-mode-map + ("M-i" . bqn-help-symbol-info-at-point) + ("C-c g" . toggle-bqn-glyphs) + ("C-c k" . toggle-bqn-keymap) + ("C-c C-e" . bqn-comint-eval-buffer) + ("C-x C-e" . bqn-comint-eval-dwim)) + :hook ((bqn-mode . bqn-comint-buffer) + (bqn-mode . disable-rainbow-delimiters-bqn) + (bqn-mode . my-bqn-mode-custom-strings)) + :config + ;; Glyphs and keyboard layout + (require 'bqn-keymap-mode) + (require 'bqn-glyph-mode) + ;; Get rid of *Quail Completions* + (defun quail-completion ())) ++
Point free or die. Stack based, array oriented, general purpose programming language.
@@ -2019,9 +2130,9 @@Here I plan to add small packages I write from time to time, mainly for non-trivial editing tasks that I stumble against at work. @@ -2097,9 +2208,9 @@
Fortran is a major component of my job as a physicist, this package provides all I need.
@@ -2115,9 +2226,9 @@IRPF90 is an environment that allows for efficient functional programming in FORTRAN using the Implicit Reference to Parameters (IRP) method. I have developed a derived @@ -2184,9 +2295,9 @@
(use-package ccls :straight t @@ -2198,9 +2309,9 @@C and C++
(use-package rust-mode :straight t) @@ -2209,9 +2320,9 @@Rust
Here it is important to mention that the following use-package
declaration exists solely
for aesthetic and organizational purposes. If we macrostep-expand
it, we can convince ourselves:
@@ -2255,9 +2366,9 @@
(use-package cmake-mode :mode ("CMakeLists\\.txt\\'" "\\.cmake\(.in\)?\\'") @@ -2283,9 +2394,9 @@Cmake
(use-package cuda-mode :mode "\\.cu\\'") @@ -2294,9 +2405,9 @@Cuda
(use-package python :straight nil @@ -2345,9 +2456,9 @@Python
(use-package julia-mode :straight t @@ -2369,13 +2480,13 @@Julia
Maxima is a CAS written in Common Lisp that has been around for quite some time. It provides capabilities for symbolic and numerical computations. The following package enhances the default @@ -2397,9 +2508,9 @@
SageMath is a comprehensive alternative to Mathematica, occasionally surpassing it in performance. However, it's written in Python, which lacks the advanced functional programming capabilities that @@ -2420,9 +2531,9 @@
This package provides support for Graphviz's dot
command line tool.
This shell draws a lot of inspiration from functional languages:
@@ -2456,9 +2567,9 @@The best of Python and Bash, in a single shell:
@@ -2472,9 +2583,9 @@(use-package haskell-mode :straight t @@ -2493,9 +2604,9 @@Haskell
(use-package cperl-mode :straight nil @@ -2505,9 +2616,9 @@Perl
(use-package raku-mode :straight t @@ -2518,9 +2629,9 @@Raku
(use-package lua-mode :straight t) @@ -2529,11 +2640,11 @@Lua
Auctex provides all you will ever need to work with LaTeX, and more.
@@ -2727,9 +2838,9 @@(use-package php-mode :mode ("\\.php\\'")) @@ -2784,9 +2895,9 @@Web
(use-package yaml-mode :straight t @@ -2796,9 +2907,9 @@YAML
(use-package markdown-mode :straight t @@ -2809,9 +2920,9 @@Markdown
(use-package rst :straight nil @@ -2826,9 +2937,9 @@reStructuredText
(use-package adoc-mode :straight t) @@ -2837,9 +2948,9 @@AsciiDoc
(use-package json-mode :mode "\\.json\\'") @@ -2851,9 +2962,9 @@JSON
A porcelain as glorious as the one from Meißen:
@@ -2876,9 +2987,9 @@This package comes very handy when writing GitLab pipelines:
@@ -2899,9 +3010,9 @@(use-package vimrc-mode :straight t) @@ -2910,9 +3021,9 @@The heretic Vimscript
Syntax highlighting for Nix expression's language files
@@ -2926,9 +3037,9 @@