summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--Makefile13
-rw-r--r--README.md7
-rw-r--r--lisp/init-eglot.el3
4 files changed, 23 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index cbf924a..d0bfd98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -99,3 +99,7 @@ tutorial/
# forge
/forge-database.sqlite
+
+# java lsp server
+/eclipse.jdt.ls/
+/eglot-eclipse-jdt-cache/
diff --git a/Makefile b/Makefile
index 7674106..b9b6701 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,23 @@
CURDIR ?= $(.CURDIR)
-LN_FLAGS = -sfn
+LN_FLAGS := -sfn
all: install
install:
ln $(LN_FLAGS) $(CURDIR) ~/.emacs.d
+install-lsp: install-lsp-go install-lsp-python install-lsp-rust
+
+install-lsp-go:
+ go install golang.org/x/tools/gopls@latest
+
+install-lsp-python:
+ python3 -m pip install --user -U python-language-server
+
+install-lsp-rust:
+ rustup component add rls
+
update:
git pull --rebase --quiet
diff --git a/README.md b/README.md
index b35ef84..af290fd 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,13 @@ the following in mind when maintaining it:
* Don't take on too many responsibilities. I.e. I have tried and failed to use
Emacs for email and RSS.
+## Language Server Protocol
+
+The `Makefile` contains targets for installing servers that implement the
+Language Server Protocol (LSP).
+
+Once installed, `eglot` should detect and use the servers automatically.
+
## Version compatibility
Lowest supported Emacs version is the one found in [Debian
diff --git a/lisp/init-eglot.el b/lisp/init-eglot.el
index d55d751..9f99a6a 100644
--- a/lisp/init-eglot.el
+++ b/lisp/init-eglot.el
@@ -2,9 +2,6 @@
:ensure t
:hook
;; load eglot automatically for these modes
- ;; - go with gopls: go install golang.org/x/tools/gopls@latest
- ;; - python with pyls: python3 -m pip install --user python-language-server
- ;; - rust with rls: rustup component add rls
((go-mode . eglot-ensure)
(python-mode . eglot-ensure)
(rust-mode . eglot-ensure)