aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/rul-emacs.org
diff options
context:
space:
mode:
authorRaúl Benencia <id@rbenencia.name>2024-11-08 08:13:25 -0800
committerRaúl Benencia <id@rbenencia.name>2024-11-08 08:13:25 -0800
commitaf0f6c80e73928109d49701b578e0142bc132e0b (patch)
tree6f8953ceb294b778a6028237a707dd4f1c402e5a /.emacs.d/rul-emacs.org
parentfde22ce2325c0bcdeb523d0c2432dde95c977d64 (diff)
emacs: org literate config for rul-prog
Diffstat (limited to '.emacs.d/rul-emacs.org')
-rw-r--r--.emacs.d/rul-emacs.org63
1 files changed, 63 insertions, 0 deletions
diff --git a/.emacs.d/rul-emacs.org b/.emacs.d/rul-emacs.org
index 13fea3a..d91ed50 100644
--- a/.emacs.d/rul-emacs.org
+++ b/.emacs.d/rul-emacs.org
@@ -1469,4 +1469,67 @@ If OTHERS is true, skip all entries that do not correspond to TAG."
(provide 'rul-org-agenda)
#+end_src
+** The =prog= module
+This package contains code related to programming or markup languages
+modes. As my configurations are generally small, I prefer to have them
+on a single file.
+#+begin_src emacs-lisp :tangle "rul-lisp/packages/rul-prog.el"
+;;; rul-prog.el --- Configuration related to programming and markup
+;;; languages
+(use-package eglot :ensure t)
+
+;; Go
+(use-package go-mode
+ :ensure t
+ :init
+ (progn
+ (bind-key [remap find-tag] #'godef-jump))
+ :config
+ (add-hook 'go-mode-hook #'yas-minor-mode)
+ (add-hook 'go-mode-hook 'electric-pair-mode)
+ (add-hook 'go-mode-hook 'my-go-mode-hook)
+ (add-hook 'before-save-hook 'gofmt-before-save))
+
+(use-package go-eldoc
+ :ensure t
+ :init
+ (add-hook 'go-mode-hook 'go-eldoc-setup))
+
+;; Latex
+(add-hook 'latex-mode-hook 'flyspell-mode)
+(setq TeX-PDF-mode t)
+
+(defun pdfevince ()
+ (add-to-list 'TeX-output-view-style
+ '("^pdf$" "." "evince %o %(outpage)")))
+
+(add-hook 'LaTeX-mode-hook 'pdfevince t) ; AUCTeX LaTeX mode
+
+;; Markdown
+(use-package markdown-mode
+ :ensure t
+ :config
+ (setq auto-mode-alist
+ (cons '("\\.mdwn" . markdown-mode) auto-mode-alist)))
+
+;; Python
+(use-package blacken :ensure t :defer t)
+(add-hook 'python-mode-hook 'py-autopep8-enable-on-save)
+
+;; Terraform
+(use-package terraform-mode :ensure t :defer t)
+
+;; YAML
+(use-package yaml-mode :ensure t :defer t)
+
+;; Rust
+(use-package rust-mode
+ :defer t
+ :init
+ (setq rust-mode-treesitter-derive t)
+ :config
+ (add-hook 'rust-mode-hook 'eglot-ensure))
+
+(provide 'rul-prog)
+#+end_src
nihil fit ex nihilo