diff options
author | Raúl Benencia <id@rbenencia.name> | 2024-10-27 16:56:06 -0700 |
---|---|---|
committer | Raúl Benencia <id@rbenencia.name> | 2024-10-27 16:56:06 -0700 |
commit | 5b6428917a8e46df69a58a10c4aeea119f27a6da (patch) | |
tree | b8f791cd4b2b4b8bb3022db2427c6b303576e382 /.emacs.d/rul-lisp/packages/rul-prog.el | |
parent | d1a611007164b1633fc6aa462084fe9541aaef88 (diff) |
emacs: move init prog languages to rul-prog module
Diffstat (limited to '.emacs.d/rul-lisp/packages/rul-prog.el')
-rw-r--r-- | .emacs.d/rul-lisp/packages/rul-prog.el | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/.emacs.d/rul-lisp/packages/rul-prog.el b/.emacs.d/rul-lisp/packages/rul-prog.el index e7753a2..7e2d1e8 100644 --- a/.emacs.d/rul-lisp/packages/rul-prog.el +++ b/.emacs.d/rul-lisp/packages/rul-prog.el @@ -7,8 +7,47 @@ (setq gc-cons-threshold (* 100 1024 1024) read-process-output-max (* 1024 1024)) +;; 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)) + +;; Define function to call when go-mode loads +(defun my-go-mode-hook () + (set 'compile-command "go build -v && go test -v && go vet")) + +;; 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 +(autoload 'markdown-mode "markdown-mode.el" + "Major mode for editing Markdown files" t) + +(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) |