askfiy / visual_studio_code

A `neovim` theme that highly restores `vscode`, so that your friends will no longer be surprised that you use `neovim`, because they will think you are using `vscode` ..
Mozilla Public License 2.0
164 stars 11 forks source link

The `colors_name` is not the same as the one used to call `:colorscheme`, and this is troublesome to work with other plugins #3

Closed nyngwang closed 1 year ago

nyngwang commented 1 year ago

For example, I have a session plugin that uses colors_name to restore colorscheme on session restore. To change to (one of) your colorscheme I have to call visual_studio_code_dark not visual_studio_code, which the session plugin calls (and failed).

Maybe you could try to set vim.g.colors_name so that the two will be consistent.

askfiy commented 1 year ago

To be honest, this problem is very difficult to solve.

It does currently use g:colors_name to record the name, after the setup function call, g:colors_name must be visual_studio_code.

Unfortunately, since :colorscheme must support both dark and light modes, they can only be set by visual_studio_code_dark and visual_studio_code_light commands.

I can't get g:colors_name to become visual_studio_code_dark or visual_studio_code_light (since lualine needs to read theme colors), so this is a sticking point.