Skip to content

Conversation

@KaiSforza
Copy link
Contributor

@KaiSforza KaiSforza commented Dec 2, 2025

With the new inner error make options, the .show_related_errors_as_nested() setting makes a lot of sense, I but did not want to enable it by default. This adds a new error mode that uses the nested error style. I called it 'tree', but if it makes more sense to call it 'nested' or 'nest' then that's fine as well.

Also added a setting to change the number of context lines shown for the labels. Sometimes this can let labels get squashed into one block of code, making it easier to read.

This also sets a #[default] for the ErrorStyle.

Release notes summary - What our users need to know

  • New option for $env.config.error_style to show related/nested errors: tree
  • New setting to change the number of lines printed for error context (default: 1): $env.config.error_lines

Tasks after submitting

@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Hey, just a bot checking in! You edited files related to the configuration.
If you changed any of the default values or added a new config option, don't forget to update the doc_config.nu which documents the options for our users including the defaults provided by the Rust implementation.
If you didn't make a change here, you can just ignore me.

@KaiSforza KaiSforza force-pushed the error_styles branch 2 times, most recently from 8127db7 to 70af576 Compare December 4, 2025 17:08
@github-actions github-actions bot added A:std-library Defining and improving the standard library written in Nu A:plugins This issue is about plugins labels Dec 9, 2025
@WindSoilder
Copy link
Contributor

Hi, sorry for waiting, would you please resolve conflicts first?

@github-actions github-actions bot removed A:std-library Defining and improving the standard library written in Nu A:plugins This issue is about plugins labels Jan 2, 2026
Copy link
Contributor

@WindSoilder WindSoilder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

With the new inner `error make` options, the `.show_related_errors_as_nested()`
setting makes a lot of sense, I but did not want to enable it by default. This
adds a new error mode that uses the nested error style.

Also added a setting to change the number of context lines shown for the labels.
Sometimes this can let labels get squashed into one block of code, making it
easier to read.
@WindSoilder WindSoilder added notes:ready The "Release notes summary" section of this PR is ready to be included in our release notes. notes:additions Include the release notes summary in the "Additions" section labels Jan 9, 2026
@WindSoilder WindSoilder merged commit af3661d into nushell:main Jan 9, 2026
17 checks passed
@github-actions github-actions bot added this to the v0.110.0 milestone Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:additions Include the release notes summary in the "Additions" section notes:ready The "Release notes summary" section of this PR is ready to be included in our release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants