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

Display evaluation results #15

Merged
merged 19 commits into from
Sep 10, 2024
Merged

Display evaluation results #15

merged 19 commits into from
Sep 10, 2024

Conversation

Klafyvel
Copy link
Owner

@Klafyvel Klafyvel commented Aug 7, 2024

Goes along Klafyvel/REPLSmuggler.jl#35

TODO:

  • Display evaluation result as text
  • Add configuration options for result display (linewidth etc...)
  • Add toggle command for result display
  • Rework errors display (fixing Make the loclist smarter #12) : Toggle command that works better (keep diagnostics in config and populate diagnostics/loclist as requested when toggling)
  • Display images if image.nvim is present
  • Add configuration options for images (sizes for example)

@Klafyvel
Copy link
Owner Author

Klafyvel commented Aug 7, 2024

First rough display of results:

image

@Klafyvel Klafyvel marked this pull request as draft August 7, 2024 22:08
@Klafyvel Klafyvel changed the title WIP: Display evaluation results Display evaluation results Aug 7, 2024
@Klafyvel
Copy link
Owner Author

The evaluated chunks are now highlighted using NeoVim's extmark.

asciicast

@Klafyvel
Copy link
Owner Author

Still TODO before doing the images: removing old results and chunks when a chunk is made invalid because the user re-ran code within a pre-existing chunk.

@Klafyvel Klafyvel force-pushed the feat-display-evaluation-results branch from 70101ec to 9e49b38 Compare August 25, 2024 14:07
@Klafyvel
Copy link
Owner Author

Images are now displayed!

image

@Klafyvel
Copy link
Owner Author

Missing configuration options:

  • IOContext keywords for text results
  • Sizes options for images
  • More options for displaying results:
    • Display by block: display results attached to the chunk they belong to rather than the line that produced it when evaluating the chunk
    • Pluto-like display: display results above the code that produced it rather than below

@Klafyvel
Copy link
Owner Author

Klafyvel commented Aug 31, 2024

Removed the capture function from the todo-list. This can be implemented later. Same goes for the display options.

@Klafyvel Klafyvel force-pushed the feat-display-evaluation-results branch from 63824c6 to c07fe8a Compare August 31, 2024 15:56
…esponses.

The previous implementation was behaving badly when sending huge code
chunks (e.g. a whole file with heacy treatments).
@Klafyvel Klafyvel marked this pull request as ready for review September 10, 2024 15:13
@Klafyvel Klafyvel merged commit c47e3a2 into main Sep 10, 2024
1 check passed
@Klafyvel Klafyvel deleted the feat-display-evaluation-results branch September 10, 2024 15:14
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.

1 participant