Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other plugin's highlights are broken by using hi clear #90

Closed
2 tasks done
Matts966 opened this issue Mar 6, 2021 · 3 comments
Closed
2 tasks done

Other plugin's highlights are broken by using hi clear #90

Matts966 opened this issue Mar 6, 2021 · 3 comments

Comments

@Matts966
Copy link

Matts966 commented Mar 6, 2021

Environment:

  • OS: OSX
  • Vim (:version)
NVIM v0.5.0-dev+nightly
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/clang -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wv
la -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/tmp/neovim-20210126-6283-12z99b1/bu
ild/config -I/tmp/neovim-20210126-6283-12z99b1/src -I/usr/local/include -I/tmp/neovim-20210126-6283-12z99b1/deps-build/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/usr/local/opt/gettex
t/include -I/tmp/neovim-20210126-6283-12z99b1/build/src/nvim/auto -I/tmp/neovim-20210126-6283-12z99b1/build/include
Compiled by masahiromatsui@MBP

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

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/HEAD-69103ff/share/nvim"

Run :checkhealth for more info
  • Terminal: alacritty

If you have a trouble with coloration and are using Vim/Neovim with terminal:

  • Does your Vim support full colors? (:set termguicolors)
  • Does your terminal support full colors? (e.g. Terminal.app doesn't support it)

Thank you for your great colorscheme! I enjoy iceberg for alacritty, vim, fzf, bat... etc. I would like to use iceberg with hop.nvim, but this issue break the highlights of it.

The 2 parts of the iceberg use hi clear

This clears all the user provided highlights, and changes colors like below.

before

スクリーンショット 2021-03-07 0 21 07

after

スクリーンショット 2021-03-07 0 21 29

Could you please remove hi clear lines?

Thank you.

@cocopon
Copy link
Owner

cocopon commented Mar 6, 2021

Thank you for using Iceberg!

hi clear is the standard way to initialize vim color schemes. Vim has an official color scheme linter and you can see that it checks an existence of this command:
https://github.com/vim/vim/blob/6914e87d3c0387fdcbb117a39e1f6d1fac0ee2e3/runtime/colors/tools/check_colors.vim#L146

I think it may be an issue of hop.nvim. For example, vim-easymotion defines its highlightings after appling a color scheme by autocmd ColorScheme * and it works well:
https://github.com/easymotion/vim-easymotion/blob/d75d9591e415652b25d9e0a3669355550325263d/autoload/EasyMotion/highlight.vim#L141

@cocopon
Copy link
Owner

cocopon commented Mar 6, 2021

Related: hadronized/hop.nvim#35

@Matts966
Copy link
Author

Matts966 commented Mar 7, 2021

Thank you for your kind explanation!
I would like to close this for hadronized/hop.nvim#35 tracks this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants