Compare commits

...

10 Commits

Author SHA1 Message Date
Mateus Rodrigues
fb5aec5b0e update straight lockfile 2026-07-12 15:23:44 +01:00
Mateus Rodrigues
bb48ac228a add some comments to separate more clearly sections of the config file. Add folding capabilities. Move some definitions around 2026-07-12 15:22:19 +01:00
Mateus Rodrigues
8bca64b5c6 install python-black but don't use it by default in python-mode 2026-07-12 15:21:54 +01:00
Mateus Rodrigues
cb1304712b use paredit in clojure mode too 2026-07-12 15:21:32 +01:00
Mateus Rodrigues
12cb8a78d7 remove loading of eshell-setup from init.el 2026-07-12 14:28:01 +01:00
Mateus Rodrigues
102896f180 some more simplifications 2026-07-12 14:08:30 +01:00
Mateus Rodrigues
1e877af4aa modernize and move eshell configuration to extras.el. remove eshell-setup.el. use paredit by default in lisp and elisp modes 2026-07-12 13:14:12 +01:00
Mateus Rodrigues
179bd6dd42 update gitignore. pin straight package versions 2026-07-11 15:57:43 +01:00
Mateus Rodrigues
c39dedeac0 Merge branch 'master' of ssh://git.lambdashire.com:9774/mprodrigues/emacs.d 2026-07-10 18:15:41 +01:00
Mateus Rodrigues
e06fd84dff some more tidying up 2026-07-10 18:15:18 +01:00
7 changed files with 209 additions and 103 deletions

4
.gitignore vendored
View File

@@ -11,7 +11,7 @@ eshell/
games/
url/
elpa/
straight/
straight/*
tramp
emms/
elisp/custom.el
@@ -19,3 +19,5 @@ eln-cache/
nov-places
transient
places
!straight/versions/

View File

@@ -1,4 +0,0 @@
(require 'esh-mode)
(add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter)
(setq eshell-output-filter-functions
(remove 'eshell-handle-ansi-color eshell-output-filter-functions))

View File

@@ -11,33 +11,27 @@
;; Set column width to 88 characters
(setq-default fill-column 88)
;;;; Load my packages
;; Default theme
;; (use-package zenburn-theme
;; :demand t
;; :config
;; (load-theme 'zenburn t))
(load-theme 'modus-vivendi-tinted t)
;; QOL packages
(use-package helpful
:bind (("C-h f" . #'helpful-callable)
("C-h v" . #'helpful-variable)
("C-h k" . #'helpful-key)
("C-h x" . #'helpful-command)))
:bind (("C-h f" . helpful-callable)
("C-h v" . helpful-variable)
("C-h k" . helpful-key)
("C-h x" . helpful-command)))
;; Org
(use-package org
;; The following binds are always needed. Why?
:bind (("\C-cl" . 'org-store-link)
("\C-ca" . 'org-agenda)
("\C-cc" . 'org-capture))
:bind (("\C-cl" . org-store-link)
("\C-ca" . org-agenda)
("\C-cc" . org-capture))
:hook ((org-shiftup-final . windmove-up)
(org-shiftleft-final . windmove-left)
(org-shiftdown-final-hook . windmove-down)
(org-shiftdown-final . windmove-down)
(org-shiftright-final . windmove-right))
:config (load "~/.emacs.d/elisp/org-setup.el"))
(use-package org-ref)
;; Writing
@@ -56,19 +50,18 @@
;; Reading
(use-package nov
:hook ((nov-mode . visual-line-mode)
(nov-mode . visual-fill-column-mode)
(nov-mode . writeroom-mode))
:config
(setq nov-text-width t)
(setq visual-fill-column-center-text t)
(add-hook 'nov-mode-hook 'visual-line-mode)
(add-hook 'nov-mode-hook 'visual-fill-column-mode)
(add-hook 'nov-mode-hook 'writeroom-mode)
(setq nov-text-width t
visual-fill-column-center-text t)
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)))
(use-package pdf-tools
:config
(progn
(pdf-tools-install)
(setq pdf-view-midnight-colors '("#DCDCCC" . "#3F3F3F"))))
(pdf-tools-install)
(setq pdf-view-midnight-colors '("#DCDCCC" . "#3F3F3F")))
(use-package saveplace-pdf-view)
@@ -78,22 +71,31 @@
;; Read feeds
(use-package elfeed)
;; Programming environment
;; The following packages are base packages to enable a more featureful programming and,
;; more generally, text editing environment. Things like, better shell/terminals, git,
;; text folding, etc.
;; Eshell configuration
;; We need colors in eshell
(use-package xterm-color)
(use-package eshell
:straight (:type built-in)
:hook (eshell-mode . (lambda ()
(setenv "TERM" "xterm-256color")))
:hook (eshell-before-prompt . (lambda ()
(setq xterm-color-preserve-properties t)))
:hook (eshell-mode . (lambda ()
(progn
(define-key eshell-hist-mode-map (kbd "<up>") nil)
(define-key eshell-hist-mode-map (kbd "<down>") nil))))
:hook ((eshell-mode . (lambda ()
(setenv "TERM" "xterm-256color")))
;; remove up and down from history keymap so we can use them to move up and
;; down like in a normal text
(eshell-mode . (lambda ()
(keymap-set eshell-hist-mode-map "<up>" nil)
(keymap-set eshell-hist-mode-map "<down>" nil)))
(eshell-before-prompt . (lambda ()
(setq xterm-color-preserve-properties t))))
:config
(load "~/.emacs.d/elisp/eshell-setup.el"))
(require 'esh-mode)
(add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter)
(setq eshell-output-filter-functions
(remove 'eshell-handle-ansi-color eshell-output-filter-functions)))
;; eat terminal emulator:
(use-package eat
@@ -104,23 +106,70 @@
"*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el"))))
(:exclude ".dir-locals.el" "*-tests.el")))
:hook ((eshell-first-time-mode . eat-eshell-mode)
(eshell-first-time-mode . eat-eshell-visual-command-mode)))
;; git
(use-package magit
:demand t
:bind ("C-x g" . 'magit-status))
:bind ("C-x g" . magit-status))
;; code completion
(use-package company
:hook (after-init . global-company-mode))
(use-package tomlparse)
;; TODO I'm only using demand so <f3> is set from the start
(use-package treemacs
:demand t
:bind ("<f3>" . 'treemacs))
:bind ("<f3>" . treemacs))
;; Text folding front end
(use-package kirigami
:custom
;; Add Kirigami to the menu bar and context menu (`context-menu-mode').
(kirigami-show-menu-bar t)
(kirigami-show-context-menu t)
:bind (("C-c z o" . kirigami-open-fold) ; Open fold at point
("C-c z O" . kirigami-open-fold-rec) ; Open fold recursively
("C-c z r" . kirigami-open-folds) ; Open all folds
("C-c z c" . kirigami-close-fold) ; Close fold at point
("C-c z m" . kirigami-close-folds) ; Close all folds
("C-c z a" . kirigami-toggle-fold)) ; Toggle fold at point
:init
(kirigami-global-mode 1))
;; Text folding back ends
(use-package treesit-fold
:defer t
:hook (python-ts-mode . treesit-fold-mode))
(use-package eglot
:straight (:type built-in)
:defer t
:hook ((python-base-mode . eglot-ensure)))
(use-package dape)
;; For a more ergonomic Emacs and `dape' experience
(use-package repeat
:custom
(repeat-mode +1))
;; Left and right side windows occupy full frame height
(use-package emacs
:custom
(window-sides-vertical t))
;; SPECIFIC PROGRAMMING LANGUAGE PACKAGES AND CONFIGURATION
;; TODO search if there already is a less hacky way to do this.
;; make emacs to call python-ts-mode whenever it would python-mode
(setq major-mode-remap-alist
'((python-mode . python-ts-mode)))
;; TODO do I really need this, what was the use case for including this package? It can
;; also be better configured as by its README on its git repository.
(use-package tomlparse)
;; Javascript and React
(use-package rjsx-mode
@@ -130,17 +179,24 @@
;; Common Lisp
(use-package slime
:config
(load "~/.emacs.d/elisp/slime-setup.el"))
(use-package paredit)
(slime-setup '(slime-fancy slime-quicklisp slime-asdf slime-mrepl))
(setq inferior-lisp-program "sbcl"))
;; Clojure
(use-package cider)
(use-package paredit
:hook ((lisp-mode emacs-lisp-mode clojure-mode) . paredit-mode))
;; Rust
(use-package rust-mode
:hook ((rust-mode . cargo-minor-mode)
(rust-mode . racer-mode)
(racer-mode . eldoc-mode))
:config
(load "~/.emacs.d/elisp/rust-setup.el"))
(keymap-set rust-mode-map "TAB" #'company-indent-or-complete-common)
(setq company-tooltip-align-annotations t))
;; Haskell
(use-package haskell-mode)
@@ -151,9 +207,8 @@
(use-package envrc
:hook (after-init . envrc-global-mode))
(use-package python-black
:after python
:hook (python-mode . python-black-on-save-mode-enable-dwim))
;; Python
(use-package python-black)
(use-package ruff-format)
@@ -175,23 +230,6 @@
;; View logs
(use-package log4j-mode)
(use-package eglot
:straight (:type built-in)
:defer t
:hook ((python-base-mode . eglot-ensure)))
(use-package dape)
;; For a more ergonomic Emacs and `dape' experience
(use-package repeat
:custom
(repeat-mode +1))
;; Left and right side windows occupy full frame height
(use-package emacs
:custom
(window-sides-vertical t))
;; TRAMP
(load "~/.emacs.d/elisp/tramp-setup.el")
(load "~/.emacs.d/elisp/outline-keymap.el")

View File

@@ -7,44 +7,34 @@
org-src-fontify-natively t
org-src-tab-acts-natively t
org-hide-emphasis-markers t
org-babel-python-command "python3")
org-babel-python-command "python3"
;; default apps to open files with org-mode
org-file-apps '((auto-mode . emacs)
("\\.mm\\'" . default)
("\\.pdf\\'" . "emacsclient %s")
("\\.djvu\\'" . "djview %s"))
;; define sequence of TODO keywords
org-todo-keywords '((sequence "TODO" "IN PROGRESS" "|" "DONE"))
;; Use biber to process bibtex
org-latex-pdf-process '("xelatex -interaction nonstopmode -output-directory %o %f"
"biber %b"
"xelatex -interaction nonstopmode -output-directory %o %f"
"xelatex -interaction nonstopmode -output-directory %o %f")
;; org-capture templates
org-capture-templates '(("l" "Library" entry (file "~/library/index.org")
"* %A %^g\n %^{Author}p\n %^{Edition}p\n %^{Format}p")
("m" "Albums" entry (file "~/repos/listas/music.org")
"* %? %^g\n %^{Autor}p\n %^{Ano}p\n %^{Colecionado}p")
("n" "Quick notes" item (file "~/org/quick.org"))))
;; load languages babel
(org-babel-do-load-languages
'org-babel-load-languages
'((C . t)
(js . t)
(emacs-lisp . t)
;(eukleides . t) TODO search for ob-eukleides
;; (eukleides . t) TODO search for ob-eukleides
(haskell . t)
(scheme . t)
(shell . t)
(python . t)
(plantuml . t)))
;; default apps to open files with org-mode
(setq org-file-apps
'((auto-mode . emacs)
("\\.mm\\'" . default)
("\\.pdf\\'" . "emacsclient %s")
("\\.djvu\\'" . "djview %s")))
;; define sequence of TODO keywords
(setq org-todo-keywords
'((sequence "TODO" "IN PROGRESS" "|" "DONE")))
;; Use biber to process bibtex
(setq org-latex-pdf-process
'("xelatex -interaction nonstopmode -output-directory %o %f"
"biber %b"
"xelatex -interaction nonstopmode -output-directory %o %f"
"xelatex -interaction nonstopmode -output-directory %o %f"))
;; org-capture templates
(setq org-capture-templates
'(("l" "Library" entry (file "~/library/index.org")
"* %A %^g\n %^{Author}p\n %^{Edition}p\n %^{Format}p")
("m" "Albums" entry (file "~/repos/listas/music.org")
"* %? %^g\n %^{Autor}p\n %^{Ano}p\n %^{Colecionado}p")
("n" "Quick notes" item (file "~/org/quick.org"))))

View File

@@ -1,7 +1,3 @@
;;;; slime setup
(slime-setup '(slime-fancy slime-quicklisp slime-asdf slime-mrepl))
(setq inferior-lisp-program "sbcl")
;; ;;; use my local copy of the Common Lisp HyperSpec
;; (load "~/clhs-use-local.el" t)

View File

@@ -25,7 +25,6 @@
(load "~/.emacs.d/elisp/settings.el")
(load "~/.emacs.d/elisp/eshell-setup.el")
(load "~/.emacs.d/elisp/extras.el")
(load "~/.emacs.d/elisp/custom.el")

View File

@@ -0,0 +1,85 @@
(("ace-window" . "77115afc1b0b9f633084cf7479c767988106c196")
("all-the-icons.el" . "4778632b29c8c8d2b7cd9ce69535d0be01d846f9")
("avy" . "933d1f36cca0f71e4acb5fac707e9ae26c536264")
("biblio.el" . "bb9d6b4b962fb2a4e965d27888268b66d868766b")
("cfrs" . "981bddb3fb9fd9c58aed182e352975bd10ad74c8")
("cider" . "d6c58b7b206af9e5239f277c0be8292984be5bbb")
("citeproc-el" . "4bde999a41803fe519ea80eab8b813d53503eebd")
("clojure-mode" . "3c68569738f04a22d52f1ca28f593c2ee733bf04")
("company-mode" . "a8c75c5d3fd7eb50b57a5b6aecc9aca58a3e9fcf")
("compat" . "b5e0cdd345adcf35b8672428acb02b4b865d0c9b")
("cond-let" . "c48600dfab6372670225f046cace263700c78eab")
("counsel-dash" . "8decb980f111ebe7027361ee252279a9076da261")
("dape" . "3bd6b22db3e4aef8d0a7e91c85ce167790af38dd")
("dash-docs" . "29848b6b347ac520f7646c200ed2ec36cea3feda")
("dash.el" . "d3a84021dbe48dba63b52ef7665651e0cf02e915")
("dashboard" . "8642af9db8c996530ffaed1f56fe95c68b96a36d")
("el-get" . "447b7efc9fca29a087f4ec29c5d8ccb580cd1c78")
("elfeed" . "9f5577fbd860ba7b4282985c4a162adab9d9b01c")
("elisp-refs" . "541a064c3ce27867872cf708354a65d83baf2a6d")
("elpher" . "d799c467a1f35934f96d33960d638ddf796f01ba")
("emacs-async" . "5faab28916603bb324d9faba057021ce028ca847")
("emacs-eat" . "c8d54d649872bfe7b2b9f49ae5c2addbf12d3b99")
("emacs-pet" . "222f1da892462d7bea5c7a7bbcb6b5a5f4cb2158")
("emacs-python-black" . "779d49c7db54590d1fa483ef2f89eea5ef8774e1")
("emacs-reformatter" . "c52e91d5438b9bf16b77b4384822e254f10a6b0a")
("emacs-request" . "c22e3c23a6dd90f64be536e176ea0ed6113a5ba6")
("emacs-ruff-format" . "063a5e703b070103f405a4cb090af47396cfb00b")
("emacsmirror-mirror" . "c05ac942a11bae3b84a60109aafde3cea367da82")
("envrc" . "77e9dec1563bc204cc9e086cd8a7d3622196224c")
("esxml" . "6a375888a74b7563eb53176aad81faee8b858189")
("f.el" . "931b6d0667fe03e7bf1c6c282d6d8d7006143c52")
("gnu-elpa-mirror" . "1a75d552f3501e228e4390e71dc709d1b391dfdc")
("haskell-mode" . "781e4669a0e0917fa8c532371cbfb1eb5b03b645")
("helm-bibtex" . "6064e8625b2958f34d6d40312903a85c173b5261")
("helpful" . "03756fa6ad4dcca5e0920622b1ee3f70abfc4e39")
("ht.el" . "1c49aad1c820c86f7ee35bf9fff8429502f60fef")
("htmlize" . "fa644880699adea3770504f913e6dddbec90c076")
("hydra" . "59a2a45a35027948476d1d7751b0f0215b1e61aa")
("inheritenv" . "b9e67cc20c069539698a9ac54d0e6cc11e616c6f")
("js2-mode" . "41d0e7f5ef51109c682016baa6fc6846e03e8517")
("jsonrpc" . "d8143c52679eaeebcca26dd41e015dc73d167b49")
("kirigami.el" . "1acf60549b078a475cf947bfc7a3f3b52f8a152e")
("let-alist" . "a331a39b02da002c6c570c4960106454f88a99a5")
("llama" . "4d4024048053b898a01521046e0f063ee47615b0")
("log4j-mode" . "45d5e3ee918f502a160c3a131ce75fd3c38e5c6e")
("macrostep" . "d0928626b4711dcf9f8f90439d23701118724199")
("magit" . "c800f79c2061621fde847f6a53129eca0e8da728")
("map" . "d0aac540461a2ed0e6f9e83de68a819d1a0db8c1")
("melpa" . "35e65c9e778b25fd5a9e95db05e5feb7e63094d3")
("nongnu-elpa" . "2e12d173f9e329f1a37c07a4a84fdbaaff12d245")
("nov.el" . "874daf5e4791a6d4f47741422c80e2736e907351")
("org" . "5ce6801d3fc127102f8a7a9b2c28e923211b3acb")
("org-ref" . "dc2481d430906fe2552f9318f4405242e6d37396")
("ox-pandoc" . "1caeb56a4be26597319e7288edbc2cabada151b4")
("paredit" . "af075775af91f2dbc63b915d762b4aec092946c4")
("parsebib" . "5b837e0a5b91a69cc0e5086d8e4a71d6d86dac93")
("parseclj" . "ca828c202c026e45bd60503984cf510d904cae50")
("parseedn" . "1a28a88e2aabd99b41e02f491d6b8874ec128d7d")
("pdf-tools" . "365f88238f46f9b1425685562105881800f10386")
("pfuture" . "19b53aebbc0f2da31de6326c495038901bffb73c")
("posframe" . "74c8c56131ed866db47ae4191364b72dd4852456")
("pydoc" . "5e76e74538ac3201ad7a3526ecf16d9ac7e73310")
("queue" . "8df1334d54d4735d2f821790422a850dfaaa08ef")
("racket-mode" . "97d9b8b7d73a02777c0f70ce6d145a99a99b37cb")
("rjsx-mode" . "b697fe4d92cc84fa99a7bcb476f815935ea0d919")
("rust-mode" . "93778358b6af8ad9e123a41bc2c8c91877a9ffd5")
("s.el" . "7393fa6fa305403e628058c0ec78c35d610fab05")
("saveplace-pdf-view" . "dc1e0b28a5ed8319a0b6725abaffba7c2fa8c730")
("seq" . "da86da9bf111f68fb81efd466d76d53af5aebc00")
("sesman" . "7eb733acb33e610a53979fa7fc13393eeda3cc53")
("slime" . "883b19c77ca42f827b5e4631c5428e244c2e063c")
("spinner" . "fa117f0893788f3fe24673715a6b83bb34d238dd")
("straight.el" . "e40a5b7f8b0c1bb2cde0e7e477b5f81303e34b95")
("string-inflection" . "4a2f87d7b47f5efe702a78f8a40a98df36eeba13")
("swiper" . "0d02f5063d36ff4fa6138f0973c83c6d3874fba0")
("tablist" . "01f065e387ffe6b7a41f180f257cd12551c7a9c2")
("tomlparse.el" . "e9424ef34c3393ea813dd5933eab6bb7e16614fe")
("transient" . "3d20a780605f0a33d6360dc0a2ce9174c69a9a92")
("treemacs" . "2ab5a3c89fa01bbbd99de9b8986908b2bc5a7b49")
("treesit-fold" . "cc1003b730a3167b972cc8400dffe19be7988fc7")
("visual-fill-column" . "e1be9a1545157d24454d950c0ac79553c540edb7")
("with-editor" . "45bfc6084f03e3aa7f4f8db20836d559186c5957")
("writeroom-mode" . "cca2b4b3cfcfea1919e1870519d79ed1a69aa5e2")
("xterm-color" . "ffdad85e584dfc0857f2a1fb970f5ef0f5d31ba3"))
:epsilon