;;; 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)