summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 1e4f9d998361df07c9c6e5c6bbbc3bcd3e977887 (plain) (blame)
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
CURDIR ?= $(.CURDIR)
ECLIPSE_JDT ?= $(CURDIR)/eclipse.jdt.ls

LN_FLAGS := -sfn
COLOR := \033[32;01m
NO_COLOR := \033[0m

all: install

install:
	ln $(LN_FLAGS) $(CURDIR) ~/.emacs.d

install-lsp: install-lsp-go install-lsp-java install-lsp-python install-lsp-rust

install-lsp-go:
	go install golang.org/x/tools/gopls@latest

install-lsp-java:
	mkdir -p $(ECLIPSE_JDT)
	curl -fsSL https://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz | \
		tar -C $(ECLIPSE_JDT) -xf -
	@echo "eclipse jdt installed in $(COLOR)$(ECLIPSE_JDT)$(NO_COLOR)"
	@echo "eglot needs the following environment variables set:"
	@echo "- $(COLOR)JAVA_HOME$(NO_COLOR) containing the path to a jdk installation"
	@printf -- "- $(COLOR)CLASSPATH$(NO_COLOR) containing $(COLOR)%s$(NO_COLOR)\n" \
		$(ECLIPSE_JDT)/plugins/org.eclipse.equinox.launcher_*.jar

install-lsp-python:
	python3 -m pip install --user -U python-language-server

install-lsp-rust:
	rustup component add rls

update:
	git pull --rebase --quiet

clean:
	rm -rf elpa/*