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
Make cursor_shape optional #10289
Make cursor_shape optional #10289
Conversation
Thanks @nibon7. I'd love to see this work, because you're right, we've had a few complaints about it recently. It kind of sounds like, if cursor shape is commented it, it "inherts" whatever cursor shape you already have. Is that right? If so, I'm wondering if |
If the |
Should we provide an option just like cursor_shape: {
emacs: none
vi_insert: none
vi_normal: none
} |
That is what I was asking. I originally was going to suggest "none" but then I thought people would think that would mean no cursor would appear, and therefore be confusing, which is why I suggested "inherit". However, if "inhert" is not really what it's doing and doesn't describe it well enough, I'm up for other terminology. |
You're absolutely right. |
Thanks @nibon7! Just to be clear, if we set each cursor_shape to |
Yes. If we comment out the cursor_shape record, it will use the default values @@ -156,9 +156,9 @@ impl Default for Config {
filesize_metric: false,
filesize_format: "auto".into(),
- cursor_shape_emacs: NuCursorShape::Line,
- cursor_shape_vi_insert: NuCursorShape::Block,
- cursor_shape_vi_normal: NuCursorShape::UnderScore,
+ cursor_shape_emacs: None,
+ cursor_shape_vi_insert: None,
+ cursor_shape_vi_normal: None,
color_config: HashMap::new(),
use_grid_icons: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'm good with this. Thanks @nibon7!!
Good idea! And yes, Btw. it could have also been
just my two cents ;) |
Description
There are several cursor shape related issues #7151 #9243 #7271 #8452 #10169, you can't disable the cursor shape feature even if you comment out the entire
cursor_shape
block in the config.nu, and even worse, when nushell exits with an error, the cursor shape can't be restored, that is annoying.This PR provides an opportunity to disable setting the cursor shape.
User-Facing Changes
If you use the default config.nu, nothing changes, but if you comment out
cursor_shape
block or set them toinherit
, related cursor shape will not be set.Tests + Formatting
After Submitting