Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Context aware evaluation #508

Open
glyh opened this issue Jun 19, 2023 · 8 comments
Open

[FR] Context aware evaluation #508

glyh opened this issue Jun 19, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@glyh
Copy link
Contributor

glyh commented Jun 19, 2023

In https://github.com/liquidz/vim-iced, there's so-called context aware evaluation, you can evaluate any inner range of any bindings, but it is required for user to provide value for those bindings. This could be useful when debugging a function for example.

This is harder than other feature to implement because it requires conjure to "understand" the code.

Some easier alternative may be only allow context aware evaluation for a whole function, then we may piece some code together to emulate a function call.

@glyh glyh changed the title Context aware evaluation [FR] Context aware evaluation Jun 19, 2023
@Olical
Copy link
Owner

Olical commented Jun 21, 2023 via email

@glyh
Copy link
Contributor Author

glyh commented Jun 21, 2023

I guess you can transfer this to https://github.com/Olical/clojure-dap then?

@Olical
Copy link
Owner

Olical commented Jun 21, 2023

Well, not sure if the exact feature translates. Debuggers allow you to break in a point and then change the surrounding context. Not sure if they let you do this, like evaluating code with all things it requires defined JIT by the user.

I also have a feeling I implemented this using a feature in CIDER...

@Olical
Copy link
Owner

Olical commented Jun 21, 2023

Ah it's completion I was thinking of. That requires you to substitute some stuff to allow completing local values from a let block. That was super fiddly too and felt like it only worked half of the time. Then I just started to lean on LSP for 90% of my completion and the issues melted away for me, personally.

@glyh
Copy link
Contributor Author

glyh commented Jun 21, 2023

Okay, let me just close this. I guess if one day if I find a proper place I can open it there. As you said this is too complicated in that it's beyond merely interacting with nREPL.

@Olical
Copy link
Owner

Olical commented Jun 21, 2023 via email

@sheluchin
Copy link

@Olical I just wanted to point out vim-iced implements this by using the feature from CIDER. Here is the original CIDER issue where it was first raised and the commit where it was implemented. Sorry to bump and old issue that's already marked as closed, but I thought it might be helpful context.

@Olical Olical reopened this Oct 16, 2023
@Olical
Copy link
Owner

Olical commented Oct 16, 2023

Fair point! Forgot about that feature, I'll take another look at some point. Or work with someone who'd like to contribute the feature.

@Olical Olical added the enhancement New feature or request label Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants