summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Clawsie <brad@b7j0c.org>2026-10-28 16:13:12 -0500
committerBrad Clawsie <brad@b7j0c.org>2026-10-28 16:13:12 -0500
commitb32621f12ec247a86d2f462f60c84c19e6af281e (patch)
treee532e25225fa99672d443c56af7aa95f13bde0af
parent8ee31371978f3b88f7fce8e265476a56ebefdeba (diff)
emacs
-rw-r--r--emacs/configure10
-rw-r--r--emacs/init.el54
-rw-r--r--fish/config.fish6
-rw-r--r--go/justfile12
-rwxr-xr-xgo/tools8
-rwxr-xr-xrust/tools1
6 files changed, 76 insertions, 15 deletions
diff --git a/emacs/configure b/emacs/configure
new file mode 100644
index 0000000..295f9ce
--- /dev/null
+++ b/emacs/configure
@@ -0,0 +1,10 @@
+sudo apt install libgnutls28-dev libgccjit-14-dev zlib1g-dev libtree-sitter-dev pkgconf libncurses-dev;
+./configure \
+ --prefix="$HOME/local/emacs" \
+ --without-x \
+ --without-pgtk \
+ --without-ns \
+ --with-native-compilation \
+ --with-tree-sitter \
+ --with-gnutls=ifavailable;
+
diff --git a/emacs/init.el b/emacs/init.el
new file mode 100644
index 0000000..783bac6
--- /dev/null
+++ b/emacs/init.el
@@ -0,0 +1,54 @@
+;;; init.el --- Emacs configuration -*- lexical-binding: t; -*-
+
+;; Appearance
+(menu-bar-mode -1)
+(setq inhibit-startup-screen t)
+(setq ring-bell-function 'ignore)
+(setq-default display-line-numbers-type t)
+(global-display-line-numbers-mode 1)
+(column-number-mode 1)
+
+;; Editing
+(global-set-key (kbd "C-l") #'goto-line)
+(setq-default indent-tabs-mode nil)
+(setq make-backup-files nil)
+(setq auto-save-default nil)
+(global-set-key (kbd "C-x w") #'kill-region)
+
+;; Completion and file finding
+(fido-vertical-mode 1)
+
+;; Project navigation
+(global-set-key (kbd "C-c p f") #'project-find-file)
+
+;; Languages
+(require 'treesit)
+
+(setq major-mode-remap-alist
+ '((go-mode . go-ts-mode)
+ (rust-mode . rust-ts-mode)))
+
+;; M-x treesit-install-language-grammar RET go RET
+;; M-x treesit-install-language-grammar RET rust RET
+;; go install golang.org/x/tools/gopls@latest
+;; rustup component add rust-analyzer
+
+(setq treesit-language-source-alist
+ '((go . ("https://github.com/tree-sitter/tree-sitter-go"))
+ (rust . ("https://github.com/tree-sitter/tree-sitter-rust"
+ "v0.23.3"))))
+
+(add-to-list 'auto-mode-alist '("\\.go\\'" . go-ts-mode))
+(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-ts-mode))
+
+(setq auto-mode-alist
+ (append '(("\\.pl\\'" . cperl-mode)
+ ("\\.pm\\'" . cperl-mode))
+ auto-mode-alist))
+
+(add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
+
+;; LSP support (available on demand)
+;; M-x eglot
+
+;;; init.el ends here
diff --git a/fish/config.fish b/fish/config.fish
index 17d0d0b..35fba3b 100644
--- a/fish/config.fish
+++ b/fish/config.fish
@@ -9,12 +9,12 @@ if status is-interactive
set -gx HISTSIZE 10000
set -gx SAVEHIST 10000
- set -gx EDITOR nvim
+ set -gx EDITOR emacs
set -gx ALTERNATE_EDITOR nano
- set -gx VISUAL nvim
+ set -gx VISUAL emacs
keychain --eval --agents ssh id_ed25519 | source
-
+
clear
end
diff --git a/go/justfile b/go/justfile
deleted file mode 100644
index dd10cb2..0000000
--- a/go/justfile
+++ /dev/null
@@ -1,12 +0,0 @@
-tools:
- go install golang.org/x/tools/cmd/goimports@latest
- go install mvdan.cc/gofumpt@latest
- go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.1
- go install honnef.co/go/tools/cmd/staticcheck@latest
- go install golang.org/x/vuln/cmd/govulncheck@latest
- go install golang.org/x/tools/gopls@latest
- go install github.com/securego/gosec/v2/cmd/gosec@latest
- go install github.com/google/capslock/cmd/capslock@latest
-
-
-
diff --git a/go/tools b/go/tools
new file mode 100755
index 0000000..8342c4d
--- /dev/null
+++ b/go/tools
@@ -0,0 +1,8 @@
+go install golang.org/x/tools/cmd/goimports@latest
+go install mvdan.cc/gofumpt@latest
+go install honnef.co/go/tools/cmd/staticcheck@latest
+go install golang.org/x/vuln/cmd/govulncheck@latest
+go install golang.org/x/tools/gopls@latest
+go install github.com/securego/gosec/v2/cmd/gosec@latest
+go install github.com/google/capslock/cmd/capslock@latest
+curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.15.0
diff --git a/rust/tools b/rust/tools
new file mode 100755
index 0000000..60ee373
--- /dev/null
+++ b/rust/tools
@@ -0,0 +1 @@
+rustup component add rust-analyzer