sainnhe / edge

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

Loading edge and its options #31

Closed dlejay closed 3 years ago

dlejay commented 3 years ago

This issue is related to https://github.com/sainnhe/gruvbox-material/issues/60

Unless adding packadd! edge before colorscheme edge, the colorscheme becomes officially loaded: echo g:colors_name returns edge but there is no actual colour change.

This is in the doc and I guess there is nothing to do about it.

The issue I'd like to point out is that even with packadd! edge, the options do not get loaded automatically. I use pack to manage plugin configurations. All options get stored in a file plugin/_pack.vim. If I want italics I have to manually add let g:edge_enable_italic = 1 in the main vimrc. Or, I need to type colorscheme edge manually.

Is there anything one can do about this?

sainnhe commented 3 years ago

I guess it's because the color scheme is applied before the configuration options are set.

I'm not sure how you manage your configurations, but you need to make sure the options are set before colorscheme edge.

dlejay commented 3 years ago

I have got to learn more on how Vim sources files. The .vimrc is loaded fist (that's why it's called init.vim in Neovim).

Conclusion: .vimrc is not the place to set the colorscheme.

Since the colorscheme shall be loaded after loading the package and setting options, have it set in your-vim-directory/after/plugin/settings.vim.