Skip to content

Conversation

@wvhulle
Copy link

@wvhulle wvhulle commented Jan 12, 2026

I am adding adding real-time diagnostics to Nu shell. To be able to show them, I need to add some features to Reedline. The goal is to give real-time feedback about partial Nushell prompts typed by the user.

In combination with nu-lint this could be helpful for new users.

  • The diagnostics can have fixes that are exposed with a new "code action" Reedline menu that is opened with keybinding CTRL+.. Fixes are accepted with ENTER.
  • Reedline would not depend on nu-lint but instead provide a mechanism for external "diagnostic providers" like nu-lint to send diagnostics to Reedline.

There is an example in the examples folder: cargo run --example diagnostics to see how the diagnostics currently look.

@wvhulle
Copy link
Author

wvhulle commented Jan 12, 2026

diagnostics

@fdncred
Copy link
Contributor

fdncred commented Jan 13, 2026

I'm leaning against landing this right now. It's so much code and it seems like it would be super intrusive as you're typing. That may just be a preference though. I'm still considering it but I need some convincing.

@wvhulle
Copy link
Author

wvhulle commented Jan 13, 2026

I'm leaning against landing this right now. It's so much code and it seems like it would be super intrusive as you're typing. That may just be a preference though. I'm still considering it but I need some convincing.

I’ll configure it locally for my own shell and use it for a while on a daily basis to check if it is worth it and if it can be made less untrusive.

@wvhulle wvhulle force-pushed the inline-hints branch 2 times, most recently from 39fbb6f to f5c7dec Compare January 13, 2026 09:11
@wvhulle wvhulle closed this Jan 13, 2026
@wvhulle wvhulle deleted the inline-hints branch January 13, 2026 10:58
@wvhulle wvhulle restored the inline-hints branch January 13, 2026 10:58
@wvhulle wvhulle reopened this Jan 13, 2026
@wvhulle
Copy link
Author

wvhulle commented Jan 13, 2026

I made the diagnostics a bit less intrusive by keeping labels shorter, dimming colors, see this image:

image

@wvhulle
Copy link
Author

wvhulle commented Jan 13, 2026

@fdncred You can test on this branch (with recent Nu-lint binary):

cargo run --example lsp_diagnostics --features lsp_diagnostics

@wvhulle
Copy link
Author

wvhulle commented Jan 13, 2026

Fix menu with alt+f:

image

@blindFS
Copy link
Contributor

blindFS commented Jan 18, 2026

@wvhulle Would you like to add the code action feature to nu-lsp and reuse it for reedline instead of implementing another lsp server? Or is there any technical issue that blocks this kind of communication?

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