Skip to content

SearidangPa/theme-loader.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What is theme-loader?

  • Automatically loads themes based on the OS theme.
  • API to toggle the OS theme and nvim theme accordingly.
  • To speed up loading, it has a cache file that stores the last used theme. Then, in the background, it checks the OS theme and loads a different theme if it is different from the last one. Because of this, the first time you load it after you change the OS theme, it will have a bit of jarring flash.
  • Only works for mac and windows, because i don't have linux

How I set it up

return {
  {
    'SearidangPa/theme-loader.nvim',
    lazy = false,
    priority = 1000,
    opts = {},
  },
  {
    'rose-pine/neovim',
    name = 'rose-pine',
    lazy = true,
    config = true,
    opts = {
      variant = 'moon',
      styles = {
        italic = false,
      },
    },
  },
}

API

  • toggle_os_theme() will toggle the OS theme and nvim theme accordingly and save the current theme to a cache file

Default Options

  {
    light_theme= 'rose-pine-dawn',
    dark_theme= 'rose-pine-moon',
  },

Demo

compressed_screen_recording.mp4

About

dark or light for day and night coding

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published