config.lua 596 B

1234567891011121314151617181920212223
  1. local config
  2. vim = vim or { g = {}, o = {} }
  3. local function opt(key, default)
  4. if vim.g[key] == nil then
  5. return default
  6. end
  7. if vim.g[key] == 0 then
  8. return false
  9. end
  10. return vim.g[key]
  11. end
  12. config = {
  13. transparent_background = opt("transparent_background", false),
  14. italic_comments = opt("italic_keywords", true) and "italic" or "NONE",
  15. italic_keywords = opt("italic_keywords", true) and "italic" or "NONE",
  16. italic_functions = opt("italic_function", false) and "italic" or "NONE",
  17. italic_variables = opt("italic_variables", true) and "italic" or "NONE",
  18. }
  19. return config