ray-x / material_plus.nvim

A pack of modern nvim color schemes: material, moonlight, Dracula (blood), Monokai, Mariana, Emerald, earlysummer, middlenight_blue... Fully support Treesitter, LSP and a variety of plugins.
GNU General Public License v2.0
22 stars 0 forks source link

Load Emerald by default even if I config otherwise #3

Closed sychen52 closed 3 years ago

sychen52 commented 3 years ago

This only happens since last update.

ray-x commented 3 years ago

I am using the following setup:

  vim.g.material_italic_comments = true
  vim.g.material_italic_keywords = false
  vim.g.material_italic_functions = false
  vim.g.material_italic_variables = false
  vim.g.material_italic_string = false
  vim.g.material_contrast = true
  vim.g.material_borders = true
  vim.g.material_disable_background = false
  vim.g.material_style_fix = false

It should load the color theme randomly.

sychen52 commented 3 years ago

I am doing the following. and everytime it loads a green background at startup: BTW, after startup, I can toggle different colorschemes using :Material

require('material.functions').change_style("monokai") I just tried setup the variables as you do. It does not help. I guess it is the way I enable the colorscheme?

ray-x commented 3 years ago

material_style_fix and material_style need to be setup before plugin is loaded. packer e.g.

{
  opt = true,
  setup = function()
     vim.g.material_style = 'mariana'
     vim.g.material_style_fix = false
  end,
  config = function()
    require("material").set()
  end
}
sychen52 commented 3 years ago

This still does not work. It still loads the Emerald on startup vim.g.material_style = 'monokai' vim.g.material_style_fix = false require("material").set() Anyway. Thank you so much for these awesome colorschemes.

sychen52 commented 3 years ago

I found the following works for me. require('material') require('material.functions').change_style("monokai") I used to have just the second line. and it works. But I guess it is not the proper way to do it.