sainnhe / edge

Clean & Elegant Color Scheme inspired by Atom One and Material
MIT License
860 stars 56 forks source link

Unexpected DiagnosticWarn Foreground Color #47

Closed Luoyayu closed 2 years ago

Luoyayu commented 2 years ago

Operating system/version

macOS Big Sur 11.5.1

Terminal emulator/version

iTerm2 Build 3.4.12

$TERM environment variable

xterm-256color

Tmux version

No response

Feature matrix

$ v --version
NVIM v0.7.0-dev+886-ga88046fe2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /Applications/Xcode_12.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/Users/runner/work/neovim/neovim/build/config -I/Users/runner/work/neovim/neovim/src -I/Users/runner/work/neovim/neovim/.deps/usr/include -I/Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/include -I/Library/Frameworks/Mono.framework/Headers -I/Users/runner/work/neovim/neovim/build/src/nvim/auto -I/Users/runner/work/neovim/neovim/build/include
Compiled by runner@Mac-1642134862519.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info
:checkhealth
coc: health#coc#check
========================================================================
  - OK: Environment check passed
  - OK: Javascript bundle build/index.js found
  - OK: Service started

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

## Performance
  - OK: Build type: RelWithDebInfo

## 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'

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

## Python 2 provider (optional)
  - INFO: pyenv: Path: /usr/local/Cellar/pyenv/2.2.3/libexec/pyenv
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - INFO: pyenv: Root: /Users/user/.pyenv
  - WARNING: No Python executable found that can `import neovim`. Using the first available executable for diagnostics.
  - ERROR: Python provider error:
    - ADVICE:
      - provider/pythonx: Could not load Python 2:
          /usr/bin/python2 does not have the "neovim" module. :help provider-python
          /usr/bin/python2.7 does not have the "neovim" module. :help provider-python
          python2.6 not found in search path or not executable.
          /usr/local/bin/python is Python 3.9 and cannot provide Python 2.
  - INFO: Executable: Not found

## Python 3 provider (optional)
  - INFO: pyenv: Path: /usr/local/Cellar/pyenv/2.2.3/libexec/pyenv
  - INFO: pyenv: $PYENV_ROOT is not set. Infer from `pyenv root`.
  - INFO: pyenv: Root: /Users/user/.pyenv
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - WARNING: pyenv is not set up optimally.
    - ADVICE:
      - Create a virtualenv specifically for Nvim using pyenv, and set `g:python3_host_prog`.  This will avoid the need to install the pynvim module in each version/virtualenv.
  - INFO: Executable: /usr/local/opt/python@3/bin/python3
  - INFO: Python version: 3.9.9
  - INFO: pynvim version: 0.4.3
  - OK: Latest pynvim is installed.

## Python virtualenv
  - OK: no $VIRTUAL_ENV

## Ruby provider (optional)
  - INFO: Ruby: ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-darwin20]
  - INFO: Host: /Users/user/.rbenv/shims/neovim-ruby-host
  - OK: Latest "neovim" gem is installed: 0.9.0

## Node.js provider (optional)
  - INFO: Node.js: v14.16.0
  - INFO: Nvim node.js host: /usr/local/lib/node_modules/neovim/bin/cli.js
  - OK: Latest "neovim" npm/yarn package is installed: 4.10.1

## Perl provider (optional)
  - ERROR: perl provider error:
    - ADVICE:
      - "Neovim::Ext" cpan module is not installed

vim.lsp: require("vim.lsp.health").check()
========================================================================
  - INFO: LSP log level : WARN
  - INFO: Log path: /Users/user/.cache/nvim/lsp.log
  - INFO: Log size: 71 KB

vim.treesitter: require("vim.treesitter.health").check()
========================================================================
  - INFO: Runtime ABI version : 13
  - OK: Loaded parser for c: ABI version 13

Minimal vimrc that can reproduce this bug.

call plug#begin(expand('~/.vim/plugged'))
Plug 'nvim-lualine/lualine.nvim'
Plug 'kyazdani42/nvim-web-devicons'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'sainnhe/edge'
call plug#end()
colorscheme edge
"colorscheme default
syntax enable
filetype on
filetype plugin on
filetype indent on
syntax on
set termguicolors

lua << END
require('lualine').setup()
END

Steps to reproduce this bug using minimal vimrc

:cocinstall coc-somelsp then trigger the warning sign in lualine

Expected behavior

colorscheme default Screen Shot 2022-01-14 at 10 52 49 PM

Actual behavior

Screen Shot 2022-01-14 at 10 49 33 PM

sainnhe commented 2 years ago

It's not controlled by color schemes

https://github.com/sainnhe/gruvbox-material/issues/113

Luoyayu commented 2 years ago

But after deleting the highlight link, it work as expected. [ highlight! link DiagnosticWarn WarningText](https://github.com/sainnhe/edge/blob/1b50c9f7875f62f7b979a991378ccbd72eadde98/colors/edge.vim#L134)

Screen Shot 2022-01-15 at 12 43 53 AM

sainnhe commented 2 years ago

DiagnosticWarn is for nvim-lsp which should not be deleted. It's linked to WarningText which is set to undercurl.