Improve how Lua client evaluates a form #495
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.