GithubHelp home page GithubHelp logo

Comments (10)

technomancy avatar technomancy commented on September 26, 2024

This actually needs to be handled server-side, probably in nREPL, but possibly with some changes to Leiningen's repl task.

from cider.

jsnikeris avatar jsnikeris commented on September 26, 2024

A workaround:

(defun my-nrepl-connected-hook ()
  (nrepl-interactive-eval
   "(do (set! *print-length* 103) (set! *print-level* 15))"))

(add-hook 'nrepl-connected-hook 'my-nrepl-connected-hook)

from cider.

kenrestivo avatar kenrestivo commented on September 26, 2024

If it could grab :port from either project.clj or profiles.clj, then mayb eit wouldn't need to prompt for one.

from cider.

kingtim avatar kingtim commented on September 26, 2024

This is fixed in leiningen now.
See issue technomancy/leiningen#788.

from cider.

mtopolnik avatar mtopolnik commented on September 26, 2024

What exactly is fixed? In the pull request mentioned in the referenced issue, only a patch specific to honoring :init is involved. This still leaves :init-ns, which is doubly convenient: it both compiles the initial namespace and sets it as the current namespace. Since practically every repl session starts with this routine performed manually, honoring init-ns in nrepl.el would obviously be a major convenience. I was actually looking into writing some elisp code that would open the .clj file of the initial namespace since this is the third part of the regular routine. I was going to rely on nrepl-current-ns, but unfortunately this doesn't get set to the init-ns.

UPDATE: I realized by reading repl task's source code that :init-ns is baked into :init. This has other issues, though: the behavior of the nrepl server is now different for headful and headless mode regarding the initial namespace (at least it looks like it).

from cider.

weissjeffm avatar weissjeffm commented on September 26, 2024

I couldn't get either :init-ns or :init to do anything at all in my nrepl.el repl.

I tried running nrepl-jack-in, :init-ns is ignored. lein repl :headless and then nrepl to connect, ignored. If I run a plain lein repl then it works. I think this needs to be re-opened since the only way to get it to work is to not use nrepl.el at all.

from cider.

mtopolnik avatar mtopolnik commented on September 26, 2024

nrepl.el needs to be fixed such that it doesn't change the current namespace upon connect. The namespace at the nrepl server side is already set to the configured initial namespace.

from cider.

weissjeffm avatar weissjeffm commented on September 26, 2024

@mtopolnik to me that sounds like this issue should be re-opened, or possibly open a new issue, then?

from cider.

mtopolnik avatar mtopolnik commented on September 26, 2024

@weissjeffm Perhaps a new issue focused on the exact requirement. I posted to nrepl.el Google Groups some time ago with this request. It would probably be better to raise an issue here.

from cider.

weissjeffm avatar weissjeffm commented on September 26, 2024

Opened #316

from cider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.