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
configure cursor shape #7151
Comments
There is no config option yet, but it's planned. Planned, meaning that no one has done it yet but we want it. |
At least exiting nu should revert the cursor to normal. But if nu can't know what the original cursor is, then I think this behavior should be disabled by default. |
FWIW, a PR has been started to make this configurable. nushell/reedline#515 |
The nushell/reedline#515 PR has been merged but I still couldn't find a way to configure it from nushell. |
If you're on the latest main branch, you can configure it by adding this to your config.nu.
IIRC, I believe it will overwrite the terminal setting with or without setting this information. Maybe someone should look at that in the future. I'm just glad to get rid of the friggin block finally. |
Just stumbled upon this issue: I'm not sure where to add the |
Btw why doesn't |
This change, I mentioned above, could go anywhere within the config section of the config.nu. You can identify this part of the config by finding So, you'd want something like, if you wanted it as the first thing in your config.nu.
You could also look at the
It probably should but it doesn't yet. Of course, this gives you a different option too. With this config option, you can different cursors depending on editing mode. Since that mode is specific to nushell, I doubt any terminal configuration would recognize it. |
Reedline supports not modifying the cursor:
I guess |
Hi, I have this in the default, generated config:
In vim, my cursor is a very fine line, and it's very difficult for me to see. I'm using version 0.81.0, installed with homebrew on MacOS. |
yes this is available now, i think we can close this issue as the question has been answered with time 😌
this might have to do with your font? 🤔 |
@tomboland when i run Neovim i have a completely different cursor, it's not even switching from large to thin underscore, but rather between a vertical bar in Nushell and a block in NORMAL mode in Neovim 😕 |
what's strange is that Nushell should not have anything to do with the cursor inside either Vim or Neovim, which is what i see on my side... |
@tomboland @amtoine I have the same and opened an issue: #10169 |
# 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 to `inherit`, related cursor shape will not be set. # Tests + Formatting <!-- Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass (on Windows make sure to [enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging)) - `cargo run -- -c "use std testing; testing run-tests --path crates/nu-std"` to run the tests for the standard library > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` --> # After Submitting <!-- If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. -->
On Windows, w/ export-env { load-env {
# https://github.com/nushell/nushell/issues/7151
config: ($env.config? | default {} | merge {
render_right_prompt_on_last_line: true,
cursor_shape: {
vi_insert: block
vi_normal: block
emacs: block
}
})
}} |
I see that there are the two vi_insert & vi_normal. Is there also an option for vi_visual & vi_replace. I don't see it on the documentation. |
@dedguy21 the |
@mb21 too bad, I was hoping it would be more like zsh/bash where the vi mode has VISUAL and REPLACE modes as well. |
Yeah, |
We don't use rustyline anymore. |
Question
It looks like the new appearance for the cursor in vi_mode is a vertical line for insert mode and a block for normal mode. Is there a configuration option to revert to a block for all modes?
Additional context and details
The text was updated successfully, but these errors were encountered: