telescope.nvim icon indicating copy to clipboard operation
telescope.nvim copied to clipboard

Broken color scheme.

Open natschz opened this issue 3 years ago • 3 comments

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

  1. Start neovim
  2. Open telescope

Expected behavior

Color scheme to look like the rest of my terminal/neovim.

Actual behavior

Color scheme is scuffed

image

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()]]

natschz avatar Aug 25 '22 19:08 natschz

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.

Conni2461 avatar Aug 26 '22 12:08 Conni2461

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?

natschz avatar Aug 27 '22 02:08 natschz

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.

DrWursterich avatar Sep 16 '22 10:09 DrWursterich

Same with me on Arch, after updating to neovim-0.8.0-3.

furadnik avatar Oct 01 '22 10:10 furadnik

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 avatar Oct 01 '22 10:10 furadnik

@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.

3N4N avatar Oct 28 '22 15:10 3N4N

@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.

3N4N avatar Nov 13 '22 03:11 3N4N

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~)

mantle2048 avatar Nov 28 '22 09:11 mantle2048

Is there a fix, besides downgrading as of now?

natschz avatar Feb 16 '23 21:02 natschz

@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

craigmac avatar Feb 16 '23 21:02 craigmac

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).

fwolfst avatar May 09 '23 07:05 fwolfst