-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
73 lines (58 loc) · 1.8 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
CURDIR ?= $(.CURDIR)
BREW ?= $(shell command -v brew 2> /dev/null)
JDT_LS_VERSION ?= 1.21.0
PREFIX ?= $(HOME)/.local/stow
JDT_LS_HOME ?= $(PREFIX)/eclipse.jdt.ls-$(JDT_LS_VERSION)
LN_FLAGS := -sfn
COLOR := \033[32;01m
NO_COLOR := \033[0m
all: install
install:
ln $(LN_FLAGS) $(CURDIR) ~/.emacs.d
install-emacs:
ifneq ($(BREW),)
$(BREW) install --cask emacs
else
$(error brew command not found)
endif
install-emacs-mac:
ifneq ($(BREW),)
$(BREW) tap railwaycat/emacsmacport
$(BREW) install --cask emacs-mac
else
$(error brew command not found)
endif
install-emacs-plus:
ifneq ($(BREW),)
$(BREW) tap d12frosted/emacs-plus
$(BREW) install --with-native-comp --with-c9rgreen-sonoma-icon emacs-plus
else
$(error brew command not found)
endif
install-lsp: install-lsp-go install-lsp-java install-lsp-python
install-lsp-go:
ifneq ($(BREW),)
$(BREW) install gopls
else
go install golang.org/x/tools/gopls@latest
endif
install-lsp-java:
mkdir -p $(JDT_LS_HOME)
FILE=`curl -fsSL https://download.eclipse.org/jdtls/milestones/$(JDT_LS_VERSION)/latest.txt`; \
curl -fsSL https://download.eclipse.org/jdtls/milestones/$(JDT_LS_VERSION)/$$FILE | \
tar -C $(JDT_LS_HOME) -zxf -
@echo "eclipse jdt ls $(JDT_LS_VERSION) installed in $(COLOR)$(JDT_LS_HOME)$(NO_COLOR)"
@echo "emacs/eglot requires the following environment variables:"
@echo "- $(COLOR)JAVA_HOME$(NO_COLOR) must contain the path to a jdk installation"
@echo "- $(COLOR)PATH$(NO_COLOR) must contain $(COLOR)$(JDT_LS_HOME)/bin$(NO_COLOR)"
install-lsp-python:
pipx install python-lsp-server
install-lsp-python-fmt:
pipx inject python-lsp-server python-lsp-ruff
install-lsp-python-types:
pipx inject python-lsp-server pylsp-mypy
install-lsp-python-more: install-lsp-python-fmt install-lsp-python-types
update:
git pull --rebase --quiet
clean:
rm -rf elpa/*