Shared: init.el / early-init.el with Vertico stack, Corfu, Eglot, treesit-auto, Catppuccin Mocha, doom-modeline, Magit, avy, harpoon, embark, wgrep, expand-region, envrc, org-mode, and drop-in lang loader. Lang configs split by stow target: - shared: elisp, org - laptop: C/C++, Rust, Go, LaTeX (AUCTeX + latexmk + Zathura) - work: C#, JS/TS/HTML/CSS/React (apheleia+prettier), Copilot install-personal.sh: Fedora — gcc/clang, rustup, Go, texlive, zathura install-work.sh: Ubuntu 24.04 WSL — dotnet-sdk-10.0, Node 22 via nvm, ts-ls Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
15 lines
419 B
EmacsLisp
15 lines
419 B
EmacsLisp
;;; lisp/langs/golang.el --- Go -*- lexical-binding: t -*-
|
|
|
|
(use-package go-mode)
|
|
|
|
(with-eval-after-load 'eglot
|
|
(add-to-list 'eglot-server-programs
|
|
'((go-mode go-ts-mode) . ("gopls"))))
|
|
|
|
(defun my/go-format-on-save ()
|
|
(add-hook 'before-save-hook #'eglot-format-buffer nil t))
|
|
|
|
(dolist (hook '(go-mode-hook go-ts-mode-hook))
|
|
(add-hook hook #'eglot-ensure)
|
|
(add-hook hook #'my/go-format-on-save))
|