This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-03
Channels
- # asami (2)
- # aws (2)
- # babashka (1)
- # beginners (26)
- # calva (5)
- # clj-kondo (1)
- # cljfx (10)
- # cljsrn (4)
- # clojure (56)
- # clojure-france (1)
- # clojurescript (4)
- # code-reviews (1)
- # conjure (9)
- # core-async (3)
- # defnpodcast (2)
- # depstar (9)
- # emacs (17)
- # fulcro (22)
- # graalvm (2)
- # graphql (10)
- # meander (6)
- # overtone (3)
- # rdf (1)
- # reitit (4)
- # shadow-cljs (32)
- # spacemacs (18)
- # sql (1)
- # vim (11)
- # xtdb (33)
I’d like to have my cursor at point over a fn, hit a hotkey and see a list of callers. Similarly, I’d like to get a list of namespaces that require the namespace at point.
Yes, for #lsp, you can check here for more info: https://emacs-lsp.github.io/lsp-mode/page/lsp-clojure/
I have looked at the clojure-lsp install instructions, and it says to download a clojure-lsp file from the github LATEST release section, which I have, and it is in a format I've not encountered before, which about 3 lines of text at the beginning that look something like a few lines of bash script, but starting with ":;" instead of "#! /bin/bash" like I see more often, and after those 3 lines of text containing binary data that my macOS's "file" command recognizes as a zip file, to the extend that "unzip -v clojure-lsp" shows what looks like a JAR file contents. Is there a name for this trick that I can look up and read more about?
The clojure-lsp
that's downloadable from github is an executable thing, but you'll probably need to change its permissions in order to execute it.
chmod +x /path/to/clojure-lsp
Then try running it according to the troubleshooting guidelines:
https://github.com/snoe/clojure-lsp/blob/master/docs/troubleshooting.md
Yes, it is indeed normal shell script stuff. The JAR format apparently allows to add pretty much whatever you want at the beginning of the file up to the point where the jar itself starts.
But I have never seen a shell script that did not start with the #!
characters before -- this one starts with :;
, which is new to me. That is what surprised me most.
perhaps folks have tracked this down already, but fwiw, found this: > One day, while studying old code, I found out that it's possible to encode Windows Portable Executable files as a UNIX Sixth Edition shell script, due to the fact that the Thompson Shell didn't use a shebang line. via: https://justine.storage.googleapis.com/ape.html
possibly it's similar to what this does: https://github.com/BrunoBonacci/lein-binplus
see for example: https://github.com/BrunoBonacci/lein-binplus/blob/master/src/leiningen/bin.clj#L22
here is an article that may touch on it: https://d2iq.com/blog/executable-jars
Yes @andy.fingerhut, this is exaclty what lein bin
does, it is a jar blundled insize a executable linux file. You can learn more about it https://github.com/Raynes/lein-bin