ishan9299 / modus-theme-vim

Port of modus-themes in neovim
MIT License
160 stars 10 forks source link

No yellow comments nor green strings #31

Closed TimoKramer closed 10 months ago

TimoKramer commented 10 months ago

Hi, I just rewrote my nvim-config with kickstart and realized that I never had yellow comments nor green strings working. I always had it enabled but it never worked, not in lua and not in any other language I used.

This is my piece of config regarding modus:

return {
  "ishan9299/modus-theme-vim",
  lazy = false,
  priority = 1000,
    config = function()
      vim.cmd([[colorscheme modus-operandi]])
      vim.g.modus_yellow_comments = true
      vim.g.modus_green_strings = true
    end,
}

and this is a screenshot: image

I really love this theme. I am open to help if someone can tell me what the problem is and points me in the right direction.

Thanks

savchenko commented 10 months ago

The following approach works:

vim.cmd[[
let g:modus_yellow_comments = 1
let g:modus_green_strings = 1
]]
vim.cmd('colorscheme modus-vivendi')

However native Lua does not:

vim.g.modus_yellow_comments = true
vim.g.modus_green_strings = true
vim.cmd('colorscheme modus-vivendi')
ishan9299 commented 10 months ago

set 1 instead of true in lua.

ishan9299 commented 10 months ago

the code checks if value is 1 or 0 https://github.com/ishan9299/modus-theme-vim/blob/4d827fbf1aad55f4d62225f7b999efc5023864a3/lua/modus-themes/highlights.lua#L365

ishan9299 commented 10 months ago

If the issue persists re-open.