Giter Club home page Giter Club logo

Comments (11)

hkupty avatar hkupty commented on July 23, 2024 1

Also, one can use jazz.nvim, which is a set of extensions of acid that make use of impromptu.nvim to have interactive menus.

I splitted that from acid since I didn't want to impose another extra dependency, so the menus are opt-in.

from acid.nvim.

hkupty avatar hkupty commented on July 23, 2024 1

Awesome! I'm really glad those issues are being solved and the experience of using acid is getting nicer :)

Please don't refrain from opening issues and let me know if you have any other problems or suggestions!

I'll close this now, but, as always, feel free to reopen if needed.

Cheers,
Henry

from acid.nvim.

hkupty avatar hkupty commented on July 23, 2024

Previous version was relying on a .nrepl-port file on the local directory. This is still available on the server server side as a fallback, but I probably should move that to lua or remove it completely.

from acid.nvim.

hkupty avatar hkupty commented on July 23, 2024

(to make my previous comment clearer)
After preparing the message to be sent to the nrepl, I send it to python which then sends through the socket. If I don't provide a connection (a tuple of [ip, port]), it will look for a local .nrepl-port, but on python side.

from acid.nvim.

daveyarwood avatar daveyarwood commented on July 23, 2024

That's interesting. How are you finding the nrepl port when there is no .nrepl-port?

from acid.nvim.

daveyarwood avatar daveyarwood commented on July 23, 2024

I phrased that poorly. I mean, how do you find the nrepl port before looking for the .nrepl-port?

from acid.nvim.

hkupty avatar hkupty commented on July 23, 2024

There are two functions on acid.connections to add a connection and to connect to it. I'll add a command to invoke both functions so that's transparent.

Another, much simpler way is to use acid.nrepl.start, as described in the docs here. For example:

"This will start a nrepl server with default arguments and cider and refactor-nrepl middlewares.
lua require("acid.nrepl").start{} 

"This will start a nrepl server with only the piggieback middleware. 
lua require("acid.nrepl").start{middlewares = {"cider/piggieback"}}

from acid.nvim.

daveyarwood avatar daveyarwood commented on July 23, 2024

Oh, cool -- I didn't realize that you can use acid to start an nREPL. I'll have to play around with that.

My typical workflow is usually to start my own nREPL in another terminal, so that I can have more control over the environment, dependencies, etc. There will often be old .nrepl-port files laying around from previous REPL sessions, so if I'm understanding correctly, acid is trying to connect on those old ports and bombing out.

In that case, maybe a good error message would be something like "Unable to connect to nREPL on port 12345."

from acid.nvim.

hkupty avatar hkupty commented on July 23, 2024

That is possible to happening, yes. I think it's safe to assume that either way I should stop doing that on python and try to find my way through with lua, so one could auto-connect if a .nrepl-port file is found and a connection is active.

I'll look into it. :)

from acid.nvim.

hkupty avatar hkupty commented on July 23, 2024

I believe this one is fixed now by 9667705, but I'll keep this open so I remember to refactor the python end.

from acid.nvim.

daveyarwood avatar daveyarwood commented on July 23, 2024

The issue is fixed from my perspective. 👍

BTW, I discovered something interesting. At least with Boot, when you quit the REPL by either running (quit) or pressing Ctrl-D, it actually removes the .nrepl-port file! So I think my theory about acid trying to connect to previous REPL sessions because there are old .nrepl-port files laying around was incorrect.

At any rate, things are feeling much nicer now. Much appreciated!

from acid.nvim.

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.