Add Emacs config with install scripts for laptop and work
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>
This commit is contained in:
11
laptop/.config/emacs/lisp/langs/c-cpp.el
Normal file
11
laptop/.config/emacs/lisp/langs/c-cpp.el
Normal file
@@ -0,0 +1,11 @@
|
||||
;;; lisp/langs/c-cpp.el --- C and C++ -*- lexical-binding: t -*-
|
||||
|
||||
(with-eval-after-load 'eglot
|
||||
(add-to-list 'eglot-server-programs
|
||||
'((c-mode c-ts-mode c++-mode c++-ts-mode)
|
||||
. ("clangd" "--background-index" "--clang-tidy"))))
|
||||
|
||||
(dolist (hook '(c-mode-hook c-ts-mode-hook c++-mode-hook c++-ts-mode-hook))
|
||||
(add-hook hook #'eglot-ensure))
|
||||
|
||||
(use-package cmake-mode)
|
||||
14
laptop/.config/emacs/lisp/langs/golang.el
Normal file
14
laptop/.config/emacs/lisp/langs/golang.el
Normal file
@@ -0,0 +1,14 @@
|
||||
;;; 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))
|
||||
30
laptop/.config/emacs/lisp/langs/latex.el
Normal file
30
laptop/.config/emacs/lisp/langs/latex.el
Normal file
@@ -0,0 +1,30 @@
|
||||
;;; lisp/langs/latex.el --- LaTeX via AUCTeX -*- lexical-binding: t -*-
|
||||
|
||||
(use-package tex
|
||||
:ensure auctex
|
||||
:custom
|
||||
(TeX-auto-save t)
|
||||
(TeX-parse-self t)
|
||||
(TeX-master nil) ; ask per-project, supports multi-file docs
|
||||
(TeX-PDF-mode t)
|
||||
(TeX-source-correlate-mode t)
|
||||
(TeX-source-correlate-method 'synctex)
|
||||
:config
|
||||
;; latexmk handles multi-pass builds (bibtex, makeindex, etc.) automatically
|
||||
(add-to-list 'TeX-command-list
|
||||
'("LatexMk" "latexmk -pdf -interaction=nonstopmode %s"
|
||||
TeX-run-command nil t :help "Run latexmk"))
|
||||
(setq TeX-command-default "LatexMk")
|
||||
;; Forward search: C-c C-v jumps PDF to current source position
|
||||
;; Inverse search: Ctrl+click in Zathura calls emacsclient (requires server-start)
|
||||
(add-to-list 'TeX-view-program-list
|
||||
'("Zathura"
|
||||
("zathura"
|
||||
(mode-io-correlate " --synctex-forward %n:0:%b") " %o")
|
||||
"zathura"))
|
||||
(setq TeX-view-program-selection '((output-pdf "Zathura"))))
|
||||
|
||||
(add-hook 'LaTeX-mode-hook #'LaTeX-math-mode)
|
||||
(add-hook 'LaTeX-mode-hook #'turn-on-reftex)
|
||||
(add-hook 'LaTeX-mode-hook #'flyspell-mode)
|
||||
(setq reftex-plug-into-AUCTeX t)
|
||||
10
laptop/.config/emacs/lisp/langs/rust.el
Normal file
10
laptop/.config/emacs/lisp/langs/rust.el
Normal file
@@ -0,0 +1,10 @@
|
||||
;;; lisp/langs/rust.el --- Rust -*- lexical-binding: t -*-
|
||||
|
||||
(use-package rust-mode)
|
||||
|
||||
(with-eval-after-load 'eglot
|
||||
(add-to-list 'eglot-server-programs
|
||||
'((rust-mode rust-ts-mode) . ("rust-analyzer"))))
|
||||
|
||||
(dolist (hook '(rust-mode-hook rust-ts-mode-hook))
|
||||
(add-hook hook #'eglot-ensure))
|
||||
Reference in New Issue
Block a user