Fork me on GitHub
#cider
<
2020-04-02
>
Setzer2208:04:57

> It should be a sequence of strings. All sequences are represented as lists in bencode. @bozhidar Ok! I've implemented the "classpath" op and this seems to get rid of the infinite request loop issue 🎉

Setzer2208:04:55

I think it still makes sense nontheless to add a special signal to the describe op. This way you can know this is a CLR repl, just in case you decide to do anything special with it in the future. For now I'd say things work really well making CIDER believe we're a JVM, But I'm concerned future updates trying to make the experience better for JVM users means things transparently break for Arcadia/CLR users. If you could check some flag before sending JVM-specific code, that'd be really great! 😅 I'm sure it will also help for other even more obscure dialects of clojure wanting to have editor support. As a side-comment, since you're taking this route of providing fallback functionality when middlewares are missing. When it makes sense to do so, I'd encourage you to try make things as platform-independant as possible (that is, stick to cljc). In the long term that would mean better support not only the small-ish CLR community but the CLJS ecosystem as well!

bozhidar09:04:26

> For now I’d say things work really well making CIDER believe we’re a JVM, But I’m concerned future updates trying to make the experience better for JVM users means things transparently break for Arcadia/CLR users. If you could check some flag before sending JVM-specific code, that’d be really great!

bozhidar09:04:08

Well, it’s good I’m the maintainer for both CIDER and nREPL, so I’ll definitely be mindful of making such changes. Actually when I find myself with a bit of time I plan to make more changes in the opposite direction. 🙂

bozhidar09:04:19

> I think it still makes sense nontheless to add a special signal to the describe op. This way you can know this is a CLR repl, just in case you decide to do anything special with it in the future.

bozhidar09:04:55

Yeah, definitely. I’ll just need to decide where exactly to put it and how to make it.

bozhidar09:04:03

I think the best option would be here:

bozhidar09:04:05

versions   (dict
               clojure (dict
                         incremental    0
                         major          1
                         minor          10
                         version-string "1.10.0")
               java    (dict
                         incremental    "1"
                         major          "10"
                         minor          "0"
                         version-string "10.0.1")
               nrepl   (dict
                         incremental    0
                         major          0
                         minor          7
                         version-string "0.7.0-beta1"))

bozhidar09:04:45

That’s part of the describe response. It’d be nice if your server returned some CLR version info and we can also added a extra key to the nrepl map - e.g. something like name/implementation/flavour.

bozhidar09:04:56

> As a side-comment, since you’re taking this route of providing fallback functionality when middlewares are missing. When it makes sense to do so, I’d encourage you to try make things as platform-independant as possible (that is, stick to cljc). In the long term that would mean better support not only the small-ish CLR community but the CLJS ecosystem as well! That’s the dream, but we’ll need some time to get there.

introom14:04:04

to make cider jump to the definition, I need to manually run cider-eval-ns-form

introom14:04:17

how to make cider automatically parse the project?

dpsutton14:04:04

the first thing i do when i open a buffer is eval the buffer

dpsutton14:04:18

then its loaded and good to go

introom15:04:02

yup. i need to know the workflow of cider. it is somehow different from cursive.

introom15:04:11

@dpsutton is it possible to load all the project instead of a single buffer/file ?

dpsutton15:04:20

if you load your main ns that usually loads mostly everything

introom15:04:44

that means, when I open project.clj, I have to go to the http://main.cl ns file and open it. cider is basically not that aware of the project level stuff ?

dpsutton15:04:44

if you've started your app then it has been loaded

dpsutton15:04:11

and by started i mean not just cider-jack-in but some kind fo start

didibus20:04:04

Ever considered using the clj-kondo analyses data: https://github.com/borkdude/clj-kondo/tree/master/analysis to add support for auto-completion of var names, macros, fns, namespaces, to show arities and to show doc, as well as for jump to definition, show uses, and add name refactoring?

didibus20:04:16

Which could all be done without a connected REPL

borkdude21:04:30

I guess CIDER doesn't want to include clj-kondo in its dependencies, but maybe it can be set up like refactor-nrepl, like some sort of add-on

bozhidar07:04:09

It’s fine to use it via the middleware, btw. I think we already discussed this in the past. That would have the advantage that users won’t have to install anything and I guess if we don’t have to shell out life on Windows would be easier. 🙂

borkdude07:04:32

^ @U0K064KQV

didibus19:04:14

Hum... I think that be a bit beyond what I'm thinking. Since middleware means running REPL no? And I'm thinking of the possibility of adding a REPLless auto-complete. Though I guess middleware clj-kondo would be nice for linting, where users don't need to install it.

borkdude21:04:56

or maybe it doesn't fit with the philosophy of CIDER which is based on nREPL, which implies a REPL?

bozhidar07:04:25

Yeah, that’s true. CIDER is first and foremost REPL-powered tool (like SLIME and most similar Lisp programming environments).

didibus23:04:41

Might be a better fit for clojure-mode itself maybe?

bozhidar07:04:37

I’d be open to something like this (depending on the complexity of the integration). In general I’m wary of adding tool-specific functionality to clojure-mode or increasing a lot the level of complexity there. Alternatively this can be a separate minor “kondo-mode” or something like this. I haven’t played enough with kondo to have a good opinion about the best course of action.

didibus19:04:03

How does Emacs handle auto-complete for other languages? Is an emacs-lisp parser implemented for them?

didibus19:04:11

Do you know?

didibus23:04:15

There were refactorings that moved to be handled by clojure-mode or cider itself over time I believe

didibus23:04:54

I can see not wanting to include the binary itself, I was thinking maybe a config, if you set the path to clj-kondo then it can use it for those features

didibus23:04:33

Actually, I would probably prefer it in clojure-mode itself, so I could use it with inf-clojure and spiral as well