Skip to content

CongLuanTran/hyde-theme.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

hyde-theme.nvim

This is an automatic theme detection intended for HyDE, a dotfile repo for Hyprland on Arch.

How this works

This plugin basically map your system's GTK theme, which HyDE will set, to a Neovim theme. It is not intended to work in isolation, you must have HyDE or some other ways to change your system GTK theme. It will not try to set the colorscheme itself due to the complexity of colorscheme intergration in Neovim.

The definition of the colorscheme itself is not shipped with the plugins, you will have to import their plugin yourself. Below is the default mapping of default HyDE themes to neovim colorscheme plugins:

You can also set your own mapping and your default theme in opts. If there is no suitable mapping, Neovim's default scheme will be used.

Installation

Use your preferred plugin manager, for example, with lazy.nvim:

return {
  { 'catppuccin/nvim', name = 'catppuccin' },
  { 'rose-pine/neovim', name = 'rose-pine' },
  { 'folke/tokyonight.nvim', opts = {} },
  { 'EdenEast/nightfox.nvim' },
  { 'ellisonleao/gruvbox.nvim', opts = {} },
  { 'miikanissi/modus-themes.nvim' },
  --- More colorscheme if you wish
  {
    "CongLuanTran/hyde-theme.nvim",
    opts = {
      -- It is possible to set your own default theme.
      -- For example, "astrotheme" if your use AstroNvim
      -- default = "astrotheme"
      -- Optionally override theme mapping or add new mapping here
      -- ["Tokyo-Night"] = "tokyonight-moon"
      -- ["Your-GTK-Theme"] = "your-colorscheme"
    },
    config = function(_, opts)
      local hyde = require("hyde_theme")
      hyde.setup(opts)
      local theme = hyde.detect_theme()
      vim.cmd.colorscheme(theme)
    end,
  }
}

About

Automatically select Neovim theme based on system GTK theme, intended for HyDE

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages