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

Improve how Lua client evaluates a form #495

Merged
merged 3 commits into from
May 28, 2023
Merged

Conversation

russtoku
Copy link
Contributor

I made a small change to how the Lua client handles ee (evaluate form under cursor). I noticed that I would have to select a region and use E to evaluate a function defintion block. Improvements were made very easily thanks to Tree-sitter.

I've also added some comments to the dev/lua/sandbox.lua file to try to document some behavior when evaluating code. I'm not sure if that's the appropriate place to put them.

@russtoku
Copy link
Contributor Author

Sorry, I didn't realize that another commit to the develop branch would piggy-back that commit on top of this PR.

@Olical
Copy link
Owner

Olical commented May 28, 2023

Ohh nice, thanks a lot! I'll take a look and promise to reply to your email question about the stdio support rewrite, will probably do so in an open discussion on GitHub though as a sort of RFC.

@Olical Olical merged commit 26e95f3 into Olical:develop May 28, 2023
@Olical
Copy link
Owner

Olical commented May 28, 2023

LGTM, tried it out locally and I'm happy. Great changes and very good understanding of the contraptions I've made 😄

@russtoku
Copy link
Contributor Author

Thanks! I'm trying to get a better understanding of how things are put together.
Thanks again for a very handy plugin. It's helping me get on with the various languages I'm interested in getting better with.

@glyh
Copy link
Contributor

glyh commented Jun 11, 2023

@russtoku If you want further improvement on this maybe you can try to find if there's a way to implement "real" REPL, because the current implementation is using debug module, that means you either loose local variables across evaluation, or you can't use the debug module when using conjure within neovim. That's a thing I didn't figure out how to do.

@russtoku
Copy link
Contributor Author

@glyh , I created #504 to capture your suggestion. This way others might be able to help. Sorry but at this point, I don't know enough of the details of the Lua client to imagine how to approach it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants