this post was submitted on 22 Nov 2023
1 points (100.0% liked)
Emacs
313 readers
2 users here now
A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!
Get Emacs
Rules
- Posts should be emacs related
- Be kind please
- Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.
Emacs Resources
Emacs Tutorials
- Beginner’s Guide to Emacs
- Absolute Beginner's Guide to Emacs
- How to Learn Emacs: A Hand-drawn One-pager for Beginners
Useful Emacs configuration files and distributions
Quick pain-saver tip
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
My solution is to run the language server in a container created from the (almost) same image.
Step 1: From your “production” docker image, derive a “development” image that installs the language server.
Step 2: Write a docker-compose.yaml that defines a service that is based on the development image and mounts the project directory.
Step 3: In your .dir-locals.el for the project, configure Eglot to use
docker-compose run --rm -w {mounted project root} {service name} {language server command line}
.What I get is navigation through my project code, and documentation/completion over libraries. What I don’t get is navigation into libraries (because they exist only in the container and in this setup Emacs only deals with files on the host.)
I have also worked with a guy who mounted his PyCharm installation and config directories and the X11 socket and the /dev/dri device inside the container, and ran an instance of the IDE inside the development container. This gave him all the advantages of working directly with the project and libraries, but the disadvantage that the IDE is separated from the host.