-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
112 lines (85 loc) · 4.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# -*- indent-tabs-mode: t; -*-
# override to use something like, say, a local version of remacs
EMACS ?= emacs
EMACS_BUILD_DIR ?= ~/lib/emacs/
all: upgrade-emacs-macos nongnu-elpa install-aero-macos
build-macos: build-emacs-macos install-aero-macos
# required for Aero, emacs-plus handles the actual Emacs dependencies
macos-reqs:
brew update
brew install coreutils git-delta tree-sitter
brew tap d12frosted/emacs-plus
build-emacs-cask-stable: macos-reqs
brew install --cask emacs
build-emacs-cask: macos-reqs
brew install --cask emacs-nightly
build-emacs-macos: macos-reqs
brew install emacs-plus@30 --with-modern-sexy-v1-icon --with-native-comp --with-xwidgets --with-dbus
ln -sf /opt/homebrew/opt/emacs-plus@30/Emacs.app /Applications
# for when libgccjit breaks every few months
# NOTE: dbus isn't working on M1 yet.
build-emacs-macos-minimal: macos-reqs
brew install emacs-plus@30 --with-modern-sexy-v1-icon --with-xwidgets
ln -sf /opt/homebrew/opt/emacs-plus@30/Emacs.app /Applications
build-emacs-macos-stable: macos-reqs
brew install emacs-plus@29 --with-modern-sexy-v1-icon --with-native-comp --with-xwidgets
ln -sf /opt/homebrew/opt/emacs-plus@29/Emacs.app /Applications
build-emacs-macos-stable-minimal: macos-reqs
brew install emacs-plus@29 --with-modern-sexy-v1-icon --with-xwidgets
ln -sf /opt/homebrew/opt/emacs-plus@29/Emacs.app /Applications
remove-emacs-macos:
brew uninstall emacs-plus@30 || true
remove-emacs-macos-stable:
brew uninstall emacs-plus@29 || true
upgrade-emacs-macos: remove-emacs-macos build-emacs-macos
install-aero-macos:
osacompile -o bin/Emacs\ \(Aero\).app bin/aero-emacs.osx.applescript
cp etc/logo/Emacs.icns bin/Emacs\ \(Aero\).app/Contents/Resources/applet.icns
[ -s /Applications/Emacs\ \(Aero\).app ] && rm -rf /Applications/Emacs\ \(Aero\).app || true
mv bin/Emacs\ \(Aero\).app /Applications/
clean-aero-macos:
rm -rf /Applications/Emacs\ \(Aero\).app
build-emacs-linux: nongnu-elpa
./bin/build/linux.zsh
install-aero-linux:
mkdir -p ~/.local/share/applications/
cp ./bin/aero-emacs.desktop ~/.local/share/applications/
linux: build-emacs-linux install-aero-linux
.PHONY: nongnu-elpa
nongnu-elpa:
# nongnu-elpa is corrupted somehow, this fixes it by cloning without fsck whether or not it's already there
rm -rf ~/.config/emacs/straight/repos/nongnu-elpa/
mkdir -p ~/.config/emacs/straight/repos/
git clone https://git.savannah.gnu.org/git/emacs/nongnu.git ~/.config/emacs/straight/repos/nongnu-elpa --config transfer.fsckobjects=false --config receive.fsckobjects=false --config fetch.fsckobjects=false
init: nongnu-elpa install-deps
git submodule init
git submodule update
clear-straight:
rm -rf ./straight/
# Clear out packages and re-init
hard-init: clear-straight init
# Continues even on failures. This lets us only install what the system can install, but can
# swallow up errors
install-deps: lsp-booster graphviz
npm i -g bash-language-server @types/node || true
npm i -g @angular/language-service@next typescript @angular/language-server typescript-language-server eslint @elm-tooling/elm-language-server || true
npm i -g emmet-ls vscode-json-languageserver || true
gem install bundler prettier_print syntax_tree syntax_tree-haml syntax_tree-rbs && npm i -g prettier @prettier/plugin-ruby || true
pip install python-lsp-server pyls-mypy pyls-black pyls-isort mypy ruff black "ptvsd>=4.2" || true
rustup component add rls rust-analysis rust-src || true
brew install clojure-lsp/brew/clojure-lsp-native || true
brew install aspell
gem install solargraph || true
opam install ocaml-lsp-server || true
nix-env -i rnix-lsp || true
# Required for org-roam graphing
graphviz:
brew install graphviz
lsp-booster:
if [ -d ~/.config/emacs/tmp/emacs-lsp-booster ]; then \
cd ~/.config/emacs/tmp/emacs-lsp-booster && git pull; \
else git clone [email protected]:blahgeek/emacs-lsp-booster.git ~/.config/emacs/tmp/emacs-lsp-booster; \
fi
cd ~/.config/emacs/tmp/emacs-lsp-booster && cargo build --release
mkdir -p ~/.local/bin
ln -sf ~/.config/emacs/tmp/emacs-lsp-booster/target/release/emacs-lsp-booster ~/.local/bin/emacs-lsp-booster