sainnhe / everforest

🌲 Comfortable & Pleasant Color Scheme for Vim
MIT License
2.94k stars 131 forks source link

Transparecy doesn't work after updating the commit 'support for shading' #107

Closed Rogerskelamen closed 2 years ago

Rogerskelamen commented 2 years ago

I have done the following steps before reporting this issue:

Operating system/version

macOS Monterey 12.6.1

Terminal emulator/version

iTerm2 3.4.18

$TERM environment variable

xterm-256color

Tmux version

I'm not using tmux

Feature matrix

gitsigns: require("gitsigns.health").check()
========================================================================
  - OK: git version 2.37.1 (Apple Git-137.1)

mason: require("mason.health").check()
========================================================================
## mason.nvim report
  - OK: neovim version >= 0.7.0
  - OK: **Go**: `go version go1.19.3 darwin/arm64`
  - WARNING: **cargo**: not available
  - WARNING: **luarocks**: not available
  - OK: **Ruby**: `ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]`
  - OK: **RubyGem**: `3.3.11`
  - WARNING: **Composer**: not available
  - OK: **PHP**: `PHP 8.1.12 (cli) (built: Oct 30 2022 12:39:49) (NTS)`
  - OK: **npm**: `8.19.2`
  - OK: **node**: `v16.13.0`
  - OK: **python3**: `Python 3.10.8`
  - OK: **pip3**: `pip 22.3.1 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)`
  - OK: **javac**: `Ok`
  - OK: **java**: `openjdk version "1.8.0_302"`
  - WARNING: **julia**: not available
  - OK: **wget**: `GNU Wget 1.21.3 在 darwin20.6.0 δΈŠηΌ–θ―‘γ€‚`
  - OK: **curl**: `curl 7.79.1 (x86_64-apple-darwin21.0) libcurl/7.79.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.45.1`
  - OK: **gzip**: `Apple gzip 353.100.22`
  - OK: **tar**: `bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 `
  - OK: **bash**: `GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)`
  - OK: **sh**: `Ok`
  - OK: GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: δΈ€ 11/21 12:35:33 2022.

mkdp: health#mkdp#check
========================================================================
  - INFO: Platform: macos
  - INFO: Nvim Version: NVIM v0.8.0
  - INFO: Node version: v16.13.0

  - INFO: Script: /Users/rok/.local/share/nvim/site/pack/packer/start/markdown-preview.nvim/app/server.js
  - INFO: Script exists: 1
  - OK: Using node

nvim: health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: Release

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $TERM_PROGRAM='iTerm.app'
  - INFO: $COLORTERM='truecolor'

nvim-treesitter: require("nvim-treesitter.health").check()
========================================================================
## Installation
  - OK: `tree-sitter` found 0.20.7 (parser generator, only needed for :TSInstallFromGrammar)
  - OK: `node` found v16.13.0 (only needed for :TSInstallFromGrammar)
  - OK: `git` executable found.
  - OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: Apple clang version 14.0.0 (clang-1400.0.29.202)
  - OK: Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

## Parser/Features H L F I J
  - json           βœ“ βœ“ βœ“ βœ“ .
  - vim            βœ“ βœ“ βœ“ . βœ“
  - lua            βœ“ βœ“ βœ“ βœ“ βœ“
  - python         βœ“ βœ“ βœ“ βœ“ βœ“
  - css            βœ“ . βœ“ βœ“ βœ“
  - javascript     βœ“ βœ“ βœ“ βœ“ βœ“
  - html           βœ“ βœ“ βœ“ βœ“ βœ“
  - yaml           βœ“ βœ“ βœ“ βœ“ βœ“
  - markdown       βœ“ . βœ“ . βœ“
  - c              βœ“ βœ“ βœ“ βœ“ βœ“
  - vue            βœ“ . βœ“ βœ“ βœ“
  - help           βœ“ . . . .
  - cpp            βœ“ βœ“ βœ“ βœ“ βœ“

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang}

provider: health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: pbcopy

## Python 3 provider (optional)
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Multiple python3 executables found.  Set `g:python3_host_prog` to avoid surprises.
  - INFO: Executable: /opt/homebrew/bin/python3
  - INFO: Other python executable: /usr/bin/python3
  - INFO: Python version: 3.10.8
  - INFO: pynvim version: 0.4.3
  - OK: Latest pynvim is installed.

## Python virtualenv
  - OK: no $VIRTUAL_ENV

## Ruby provider (optional)
  - INFO: Ruby: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
  - WARNING: `neovim-ruby-host` not found.
    - ADVICE:
      - Run `gem install neovim` to ensure the neovim RubyGem is installed.
      - Run `gem environment` to ensure the gem bin directory is in $PATH.
      - If you are using rvm/rbenv/chruby, try "rehashing".
      - See :help |g:ruby_host_prog| for non-standard gem installations.
      - You may disable this provider (and warning) by adding `let g:loaded_ruby_provider = 0` to your init.vim

## Node.js provider (optional)
  - INFO: Node.js: v16.13.0
  - INFO: Nvim node.js host: /Users/rok/.nvm/versions/node/v16.13.0/lib/node_modules/neovim/bin/cli.js
  - OK: Latest "neovim" npm/yarn/pnpm package is installed: 4.10.1

## Perl provider (optional)
  - WARNING: "Neovim::Ext" cpan module is not installed
    - ADVICE:
      - See :help |provider-perl| for more information.
      - You may disable this provider (and warning) by adding `let g:loaded_perl_provider = 0` to your init.vim

rnvimr: health#rnvimr#check
========================================================================
## OS
  - OK: Name: Mac

## Ranger
  - OK: Version: ranger 1.9.3

## Python
  - OK: Version: 3.10.8 (main, Oct 13 2022, 09:48:40) [Clang 14.0.0 (clang-1400.0.29.102)]

## Pynvim
  - OK: Version: 0.4.3

## Ueberzug (optional)
  - INFO: Ueberzug is not support for Mac

## RPC
  - OK: RPC echo: Neovim send "Give me five!" and receive "Give me five!"

telescope: require("telescope.health").check()
========================================================================
## Checking for required plugins
  - OK: plenary installed.
  - OK: nvim-treesitter installed.

## Checking external dependencies
  - OK: rg: found ripgrep 13.0.0
  - OK: fd: found fd 8.5.2

## ===== Installed extensions =====

## Telescope Extension: `yank_history`
  - INFO: No healthcheck provided

translator: health#translator#check
========================================================================
  - OK: Async check passed
  - OK: Floating window check passed
  - OK: Using python3

vim.lsp: require("vim.lsp.health").check()
========================================================================
  - INFO: LSP log level : WARN
  - INFO: Log path: /Users/rok/.local/state/nvim/lsp.log
  - INFO: Log size: 1853 KB

vim.treesitter: require("vim.treesitter.health").check()
========================================================================
  - INFO: Runtime ABI version : 14
  - OK: Loaded parser for c: ABI version 13
  - OK: Loaded parser for cpp: ABI version 14
  - OK: Loaded parser for css: ABI version 13
  - OK: Loaded parser for help: ABI version 14
  - OK: Loaded parser for html: ABI version 13
  - OK: Loaded parser for javascript: ABI version 13
  - OK: Loaded parser for json: ABI version 13
  - OK: Loaded parser for lua: ABI version 13
  - OK: Loaded parser for markdown: ABI version 13
  - OK: Loaded parser for python: ABI version 14
  - OK: Loaded parser for vim: ABI version 14
  - OK: Loaded parser for vue: ABI version 13
  - OK: Loaded parser for yaml: ABI version 13
  - OK: Loaded parser for c: ABI version 13
  - OK: Loaded parser for help: ABI version 14
  - OK: Loaded parser for lua: ABI version 13
  - OK: Loaded parser for vim: ABI version 14

Minimal vimrc that can reproduce this bug.

-- mini.lua
local fn = vim.fn

vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.everforest_transparent_background = 1

vim.cmd [[
  set termguicolors
  colorscheme everforest
]]

-- Automatically install packer
local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
  PACKER_BOOTSTRAP = fn.system {
    "git",
    "clone",
    "--depth",
    "1",
    "https://github.com/wbthomason/packer.nvim",
    install_path,
  }
  print "Installing packer close and reopen Neovim..."
  vim.cmd [[packadd packer.nvim]]
end

local status_ok, packer = pcall(require, "packer")
if not status_ok then
  return
end

return packer.startup(function(use)

  use "sainnhe/everforest"

  use {
    "nvim-tree/nvim-tree.lua",
    requires = {
      "nvim-tree/nvim-web-devicons", -- optional, for file icons
    },
    tag = 'nightly', -- optional, updated every week. (see issue #1193)
    config = function ()
      require("nvim-tree").setup()
    end,
  }

  if PACKER_BOOTSTRAP then
    require("packer").sync()
  end
end)

Steps to reproduce this bug using minimal vimrc

  1. Lauch neovim use nvim -u mini.lua
  2. Execute :PackerSync to install nvim-tree and everforest
  3. Execute :NvimTreeToggle to open nvim-tree
  4. Then you will see the nvim-tree bar doesn't become transparent, even though you set everforest_transparent_background = 1.

After some testing, I find the issue may be caused by the commit 'support for shading', in which the codes make a dim for nvim-tree(and add some highlight rules for nvim-tree)

Expected behavior

image

This is the screenshot after I rollbacked the commit tree ahead 'support for shading'.

Actual behavior

image
sainnhe commented 2 years ago

Should be fixed via https://github.com/sainnhe/everforest/commit/d855af543410c4047fc03798f5d58ddd07abcf2d

Rogerskelamen commented 2 years ago

It works, well done! Thank you.