nushell/crates/nu-plugin/src
Devyn Cairns 00b3a07efe
Add GetSpanContents engine call (#12439)
# Description
This allows plugins to view the source code of spans.

Requested by @ayax79 for implementing `polars ls`. Note that this won't
really help you find the location of the span. I'm planning to add
another engine call that will return information more similar to what
shows up in the miette diagnostics, with filename / line number / some
context, but I'll want to refactor some of the existing logic to make
that happen, so it was easier to just do this first. I hope this is
enough to at least have something somewhat useful show up for `polars
ls`.

# User-Facing Changes
- Example plugin: added `example view span` command

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting
- [ ] Add to plugin protocol reference
2024-04-09 10:02:17 -04:00
..
plugin Add GetSpanContents engine call (#12439) 2024-04-09 10:02:17 -04:00
protocol Add GetSpanContents engine call (#12439) 2024-04-09 10:02:17 -04:00
serializers Rename Value::CustomValue to Value::Custom (#12309) 2024-03-27 22:10:56 +01:00
util Range refactor (#12405) 2024-04-06 09:04:56 -05:00
lib.rs Make drop notification timing for plugin custom values more consistent (#12341) 2024-04-04 09:13:25 +02:00
sequence.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00