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
can not control cursor color in nvim using guicursor option #2635
Comments
I think you may want to install and enable the wezterm terminfo for this to work. |
In #1625 it sounded like you already had this working? Per my comments in #1073, I think this class of issue is more a question for the neovim folks: the terminal supports this functionality, but it's not clear what neovim uses to decide to use it. If you can go and find out, we can figure out what to do next. |
yeah, it once works, now wezterm and neovim both have a lot of updates, it stops working. If it is an neovim issue, I suppose kitty would also break? I do not know the internals, so do not know how to proceed. |
Using |
I'm facing the exact same problem. In neovim, wezterm's cursor overrides neovim's colorscheme specific cursor. Another problem is that the cursor doesn't have a foreground so in neovim I can't see the text under my cursor. |
Related issue opened: neovim/neovim#20706. The neovim dev said this is a problem of wezterm terminfo file. I am not sure which is right since I do not know the internal source code. |
nvim uses these to set the title string; really, it is setting the status line, but it has an assumed fallback for xterm that redefines the status line update operations in terms of setting the title of the xterm window. Let's ensure that our terminfo has these entries defined, as the nvim fallback currently looks for `xterm` in the value of $TERM to decide whether the fallback is appropriate, and that test does not pass when the user has set term=wezterm. refs: neovim/neovim#20706 refs: #2635 See also: https://codeberg.org/dnkl/foot/pulls/243/files, https://codeberg.org/dnkl/foot/issues/242, alacritty/alacritty#1636
@jdhao that other issue is for the title string, which is now resolved by updating the terminfo file in |
okay, assume i use |
I think we need to ask the nvim folks about this explicitly! |
okay, if this issue is not related to |
I fixed a cache invalidation issue with the cursor color in |
I tried latest version (commit |
@jdhao , I just tried with latest commit( |
I'm still having this issue. Can reproduce it with the stable and nightly build of wezterm on ubuntu 22.04 and windows 10. The guicursor color is set properly in all other terminal emulators I've tried (Kitty, Gnome and Alacritty). |
I can reproduce this issue, but only when The symptom seems to be that with above setting the cursor is always* a 1cell block of in wezterm configured color, regardless of the
It is possible, that we have a beautiful interplay of 2 bugs in wezterm and neovim, but I think it is safe to assume we have an issue in wezterm in regards to the |
I also experience this issue. Here are some relevant infos
I'd like to get it fixed, so I'm thankful for any hint for debugging. Edit 1: The cursor settings work fine in Alacritty. Edit 2: Here is a minimal example of a NeoVim config. In Alacritty, the cursor is the reverse of the syntax highlighting colors. In Wezterm this is not the case. highlight Cursor gui=reverse guifg=NONE guibg=NONE Edit 3: It seems like it is a problem with my Wezterm color scheme. With an empty config in my Edit 4: It does not work entirely as expected. In Alacritty, the cursor color in NeoVim is actually the reverse of the font color, depending on the syntax highlighting. In Wezterm, without any color scheme, the cursor has the same color independent of the font color / syntax highlighting. Edit 5: I can set the cursor color in Wezterm with config.colors = {
cursor_bg = "#000000",
cursor_fg = "#FFFFFF",
cursor_border = "#000000",
} This is also used as cursor color in NeoVim. Edit 6: This is basically what I have settled on :) |
I fixed a different invalidation issue just now that may relate to this issue. |
Hi @wez, thanks for trying to fix it! I downloaded the artifact from https://github.com/wez/wezterm/actions/runs/7748751221, unpacked and run Unfortunately the cursor stays the same color in neovim 0.9.5. I have terminfo installed and I tryied to start nvim with The interesting thing is that for both the latest release and this nightly build cursor does change color in the command window of noice.nvim. But this happens only there, maybe that window has a different cursor color implementation. |
Looking at this again: |
Thanks a lot for the insight! For me that solves the issue. 🎉 |
@wez, could you please review this issue and the related one in Neovim? |
I looked at it the other day; it seems like the color isn't being changed at all in nvim, so I'm happy to close this. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
What Operating System(s) are you seeing this problem on?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
20221015-164502-7b904f05
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
setting the
guicursor
option for nvim can not change the cursor color when opening nvim inside wezterm.To Reproduce
Content of
test.vim
:Run nvim inside wezterm using following command:
Configuration
no config
Expected Behavior
The cursor should be changed to red in normal mode, but instead it is not changed to red.
If I use the above config in kitty, the cursor is changed to red when opening nvim inside kitty.
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: