telescope.nvim
telescope.nvim copied to clipboard
Broken color scheme.
Description
I'm on WSL 2 and the colors seam to be completely off. What can I do about that?
Neovim version
NVIM v0.8.0-dev-929-g9a100ee16
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Operating system and version
Windows
Telescope version / branch / rev
Latest
checkhealth telescope
telescope: require("telescope.health").check()
========================================================================
## Checking for required plugins
- OK: plenary installed.
- OK: nvim-treesitter installed.
## Checking external dependencies
- ERROR: rg: not found. `live-grep` finder will not function without [BurntSushi/ripgrep](https://github.com/BurntSushi/ripgrep) installed.
- WARNING: fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities
## ===== Installed extensions =====
Steps to reproduce
- Start neovim
- Open telescope
Expected behavior
Color scheme to look like the rest of my terminal/neovim.
Actual behavior
Color scheme is scuffed

Minimal config
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
require('packer').startup {
{
'wbthomason/packer.nvim',
{
'nvim-telescope/telescope.nvim',
requires = {
'nvim-lua/plenary.nvim',
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
},
},
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. '/plugin/packer_compiled.lua',
display = { non_interactive = true },
},
}
end
_G.load_config = function()
require('telescope').setup()
require('telescope').load_extension('fzf')
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
print("Installing Telescope and dependencies.")
vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
Uff not sure what happened here but our used highlight groups are just mapped to Normal https://github.com/nvim-telescope/telescope.nvim/blob/master/plugin/telescope.lua#L18-L22
So maybe check hi Normal. You can also checkout set termguicolors or maybe install a somewhat modern color scheme. You dont need one with "telescope support" because we just link to default hl groups.
Thanks for the response! So hi Normal I think does nothing for me. If I'm doing set termcolors, it changes but I think it gets worse :(
I tried different colors I'm just using color themes from https://windowsterminalthemes.dev/ What I don't understand are the neovim colors ok, but not the telescope colors? Would you have any ideas or hints how I could check why this is happening for me?
Because I'm not even sure, but am I correct to assume per default, the colors e.g. bg color should be the same as my neovim bg color right?
I have the same issue on Ubuntu 22.04. after updating neovim to v0.8.0-dev-1100-g754822a06 (currently latest commit on master). I git bisected it and found this mr to be at fault.
But I don't know wether this is a neovim issue or if that merge introduced an intended api change of some sorts.
Same with me on Arch, after updating to neovim-0.8.0-3.
Turns out the problem (in my case at least) is that NormalFloat highlight is linked to Pmenu.
Unlinking them by doing :hi NormalFloat ctermfg=LightGrey fixes the problem for me.
Hope this helps...
@furadnik Changing NormalFloat changes colors for all floating windows, which includes the floating window of LSP diagnostics. Your solution (which was what I came up with, too) is only a hack. This needs to be addressed/fixed properly soon.
Tagging @Conni2461 in case they are not updated on this issue: DrWursterich found the culprit commit. Hope that helps debugging this.
@Conni2461 a feedback would be great. Even if you're busy with other tasks, a notification that you are at least aware of the current situation is helpful to us users.
Hi, I have the same issue on WSL2 Ubuntu 20.04 with nvim 0.8.1. Through checking the theme config of windows terminal, I found that the color matching of telescope in wsl2 seems a bit muddled.
For example, black and white are reversed. And the background color is pinned to a specific color (for me is "brightPurple"). So I am able to switch the background color by modifying the hexadecimal color :(.
The background color change makes it harder to identify items in telescope panel. However, in linux server, the background color is transparent.
Is there any solution to manually modify the background color of telescope??? (As an alternative solution, just downgrade nvim version to 0.7.2 and everything will be ok~)
Is there a fix, besides downgrading as of now?
@natschz not from telescope.nvim no, try solutions in this thread, they work fine. What you are seeing is intended default: https://github.com/neovim/neovim/issues/20698
Since I am trying to get familiar with the lua side of things
:hi NormalFloat ctermfg=LightGrey translates to vim.api.nvim_set_hl(0, 'NormalFloat', {fg = LightGrey}) afaict (works for me).