this post was submitted on 28 Jun 2024
9 points (84.6% liked)

Neovim

1962 readers
15 users here now

founded 1 year ago
MODERATORS
 

idk im having this issue for a long time. itd be nice to have this fixed.

thanks

Edit: I that doesnt help:

  • term=xterm-... in shell config
  • set-option -ga terminal-overrides ",xterm-256color:Tc" in tmux config
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 2 days ago* (last edited 2 days ago) (9 children)

Huh, that is quite odd. Have you set tmux to true colour? If not that may be the issue, though I don't see why it would select those specific colours.

Incase you haven't, here's the configuration to do so. Place the following in your tmux.conf located at ~/.config/tmux/tmux.conf or ~/tmux.conf

set -g default-terminal "screen-256color"

you should have to run tmux source ~/.config/tmux/tmux.conf to get it to reload

You may also have to add the following to your nvim config:
set termguicolors

or set TERM to xterm-256color in your shell (example: export TERM="xterm-256color" for bash)

Though I doubt either are your problem.

Edit: fixed neovim configuration

[–] [email protected] 2 points 2 days ago* (last edited 2 days ago) (8 children)

Thanks for helping. But No luck with those. Tried them all. vim said there's no option like "term". Other two doesnt work :(

[–] [email protected] 2 points 2 days ago* (last edited 2 days ago) (1 children)

Ah shit, that sucks, sorry to hear.

Sorry on that command if you're using lua to configure the correct setting should be

vim.opt.termguicolors = true

Or in your init.vim set termguicolors should work too. Apologies for messing up that last comment

If you're still up to trying some stuff, last thing I can think of is tmux deciding not to take the setting. Forcing tmux to use true color may help with set -ag terminal-overrides ",$TERM:Tc" or launching with tmux -2 may help, you'll have to source the tmux config again of course. Also confirming that your terminal supports true color

[–] [email protected] 2 points 2 days ago (1 children)

I tried that. Not working. Im really sorry, I shouldve mentioned this on the original post itself. I did some searches and tried these already. Im really sorry

[–] [email protected] 1 points 2 days ago* (last edited 2 days ago) (1 children)

Yeah thought you may have done so, still good to check. Hope the best for you but I can't think of anything else myself, unless you have a background set in tmux and a transparent background in neovim

For others who may help, what terminal are you using? What is is the output of echo $TERM?

[–] [email protected] 2 points 2 days ago (2 children)

Foot. It says foot. When I'm in tmux it says tmux-256color

[–] mazadin 3 points 2 days ago (1 children)

Try this in tmux.conf:

set-option -ga terminal-overrides ",foot:Tc"

These overrides apply to the TERM you are using outside of tmux (where this is running).

[–] [email protected] 1 points 1 day ago

Im really sorry that I couldn't reply soon. I'll try it out

[–] [email protected] 1 points 2 days ago

Yeah that's the expected output. I'd see if alacritty or kitty works as expected to rule out foot being the issue, then manually setting term=xterm-256color in your foot.ini if it does work in either

This must be incredibly frustrating

load more comments (6 replies)
load more comments (6 replies)