-
Notifications
You must be signed in to change notification settings - Fork 328
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
bug: Cursor shape modified #829
Comments
Your terminal cursor is unrelated to the guicursor option in Neovim (or at least should be). What is your |
|
lazy doesn't change any cursor settings. I really have no idea why this happens. Might be a Neovim issue. Won't further look into this. Closing as won't fix. |
use this instead: |
Ooh I think this works, but it is weird that I need it... |
@folke I think it is actually many more problems, where basically the code in my Neovim config is either overwritten (potentially by a plugin that got lazy-loaded after my configuration?) or never applied. These include:
Assuming it is plugins overwriting these settings (somehow), what would the correct way to fix this be? |
It turns out that So I've just updated all usage of Unfortnately that probably won't fix your issue, since I'm pretty sure it's other plugins that accidentally change the global options. |
Using Very unfortunate that |
@folke, I don't think this is intended behavior, it sounds like a bug, mind me asking how did you reproduce this and got to the conclusion Fearing this might affect my plugin too I just did a simple test, opened a file in neovim and used :lua vim.wo[1000].number=false
:lua vim.wo[1000].relativenumber=false This works as expected, only the first window has the numbers removed, works the same if I use the second window index ( :lua vim.wo.number=false
:lua vim.wo.relativenumber=false It is worth noting that using an additional Could this be related to something else? |
It's that second case I was referring to. You can prevent inheritance by using a window local scope. Vim.wo is window global |
To be clear, it doesn't set the option globally. It sets the option window-global, which is something else |
|
@folke, I'm not certain which version it was added in, but it's worth noting that my neovim (
Though, the
It should be considered when the |
Changing settings using `vim.wo` sets the window-global value which has implications when splitting a window to open a new buffer. In this case splitting the window confusingly inherits the global value. While `vim.wo` uses a window global scope, using `opt_local` or similar sets just the local value and prevents inheritance of the changed value when splitting the window. This changes resolves issues with losing `number` settings when opening a file type with numbers after opening a file type without numbers. The issue meant needing to manually re-enable number settings. Note: it's unclear whether `vim.api.nvim_set_option_value` is the right API versus `opt_local` which appears to behave the same. Going with the former per the documentation and what `@folke` used in there update. See the following: `h: local-options` `folke/lazy.nvim#829 `neovim/neovim#14595
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.9.0 release
Operating system/version
macOS Monterey 12.6.1
Describe the bug
When Lazy detects a new plugin to install and shows the popup on VimEnter, there is a problem where it sets my cursor to a block cursor when it always otherwise is an underline cursor.
guicursor
is being set in my configuration, and that line is being run because I can check:verbose set guicursor?
except now it's a block. The cursor gets reset to an underline when Neovim is exited. I use Kitty terminal emulator.Steps To Reproduce
cursor_shape underline
repro.lua
below as it is reproduces the issue for me)Expected Behavior
Cursor shape is still underline
Repro
The text was updated successfully, but these errors were encountered: