-
-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make jump-to-definition work in projects needing `cider-path-translat…
…ions` i.e. Dockerized projects. Fixes #3413
- Loading branch information
Showing
11 changed files
with
111 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
((nil . ((eval . (customize-set-variable 'cider-path-translations | ||
(list | ||
(cons "/src" (clojure-project-dir)) | ||
(cons "/root/.m2" (concat (getenv "HOME") "/.m2")))))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM clojure:temurin-17-lein-bullseye | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV NREPL_PORT=7888 | ||
WORKDIR /root/app | ||
COPY . /root/app | ||
RUN lein deps | ||
EXPOSE 7888 | ||
RUN lein classpath | ||
CMD ["lein", "repl", ":headless", ":host", "0.0.0.0", ":port", "7888"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build: | ||
DOCKER_BUILDKIT=0 docker build --no-cache -t cider-docker-dev . | ||
|
||
run: build | ||
docker run -v $$PWD/src:/app/src -p 7888:7888 cider-docker-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
This project spins up a Clojure project within a Docker image. | ||
|
||
The Docker image exposes an nREPL server. | ||
|
||
This way, for development purposes, we can exercise CIDER's Docker-related capabilities. | ||
|
||
To get started: | ||
|
||
* From a terminal tab, run `make run` to run the Docker image | ||
* Note that it has a volume mapping for `src`, so any local changes will be visible in the Docker image. | ||
* Also note that the root of this subproject has a .dir-locals.el setting up `cider-path-translations`. | ||
* `M-x cider-connect-clj`, choose localhost, 7888 | ||
* `M-x cider-load-buffer` the foo.clj namespace. | ||
* From now on, you can `M-.` (jump to definition) recursively, starting from `clj-http.client`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(defproject cider-docker-dev "0" | ||
:dependencies [[org.clojure/clojure "1.11.1"] | ||
[clj-http "3.12.3"]] | ||
:source-paths ["src"] | ||
:plugins [[cider/cider-nrepl "0.35.0"]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(ns bar | ||
(:require [foo])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(ns foo | ||
(:require | ||
[clj-http.client :as client])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters