{"id":13526503,"url":"https://github.com/sontungexpt/witch","last_synced_at":"2025-09-01T03:13:10.373Z","repository":{"id":219711193,"uuid":"749583066","full_name":"sontungexpt/witch","owner":"sontungexpt","description":"The main theme for stinvim  Easy to use, easy to config, easy to extend.","archived":false,"fork":false,"pushed_at":"2024-07-22T09:19:41.000Z","size":612,"stargazers_count":55,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T02:21:46.982Z","etag":null,"topics":["colorscheme","lua","neovim","nvim","plugins","stinvim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sontungexpt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-29T01:00:46.000Z","updated_at":"2025-03-27T03:12:37.000Z","dependencies_parsed_at":"2024-06-24T14:06:22.628Z","dependency_job_id":"da95e60f-1f36-498d-b968-c8c32e658190","html_url":"https://github.com/sontungexpt/witch","commit_stats":null,"previous_names":["sontungexpt/stinvimui","sontungexpt/witch"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fwitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fwitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fwitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fwitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sontungexpt","download_url":"https://codeload.github.com/sontungexpt/witch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886327,"owners_count":21177644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["colorscheme","lua","neovim","nvim","plugins","stinvim"],"created_at":"2024-08-01T06:01:30.709Z","updated_at":"2025-04-14T13:12:44.651Z","avatar_url":"https://github.com/sontungexpt.png","language":"Lua","readme":"The main theme for [stinvim](https://github.com/sontungexpt/stinvim)\n\nEasy to use, easy to config, easy to extend.\n\n## Features\n\n🤩 Beautiful colorscheme.\n\n😁 Support for many themes, including: dark, light, and more(coming soon).\n\n🤔 Easy to config, easy to extend.\n\n🤗 Support for dimming inactive windows.\n\n🤩 Support for add more highlight of the theme.\n\n🤪 Support for add more theme.\n\n😆 Witch boasts robust support for loading customized syntax highlighting tailored to specific filetypes, buftypes, events.\n\n😁 Easy to switch between themes easily with `:Witch \u003ctheme_name\u003e` command.\n\n👀 Try to load highlighting incrementally to hopefully reduce the time it takes to load the neovim.\n\n## Preview\n\nThe colors in the preview may appear different from those in your Vim due to potential errors during color conversion.\n\n![witch](./docs/readme/preview1.png)\n\nhttps://github.com/sontungexpt/witch/assets/92097639/ebf730fc-3218-427f-b8a5-ae0fa5895532\n\n## Installation\n\n```lua\n    -- lazy\n    {\n        \"sontungexpt/witch\",\n        priority = 1000,\n        lazy = false,\n        config = function(_, opts)\n            require(\"witch\").setup(opts)\n        end,\n    },\n\n```\n\n## Options\n\n```lua\n    require(\"witch\").setup {\n        theme = {\n            -- if you disable the theme, no default highlight styles will be set by default\n            -- you must to add a customs module or extras module to set the highlight styles\n            enabled = true,\n\n            -- default style of the theme\n            -- \"dark\", \"light\"\n            style = \"dark\",\n\n            -- more module that you want it should be loaded\n            extras = {\n                -- bracket = true,\n                -- dashboard = true,\n                -- diffview = true,\n                -- explorer = true,\n                -- indentline = true,\n\n                -- you can disable startup module by setting enabled to false\n                -- then you can add the startup module by yourself like extras module like above\n                -- [\"startup.\u003cmodule_name\u003e\"] = true,\n            },\n\n            -- custome your highlight module\n            -- see: witch.theme.example\n            customs = {\n                -- require(\"witch.theme.example\"),\n            },\n\n            -- This function is called when witch starts highlighting.\n            -- It provides a unique opportunity to modify the default highlight groups.\n            -- If you wish to customize the default highlight groups, you can do so here.\n            -- This function is invoked after loading all colors and highlight options\n            -- but before applying the highlights, allowing users to adjust undesired highlights.\n            -- you can do something like this\n            --\n            -- on_highlight = function(style, colors, highlight)\n            -- \tif style == \"dark\" then\n            -- \t\t-- change the default background of witch\n            -- \t\tcolors.bg = \"#000000\"\n\n            -- \t\t-- change the Normal highlight group of witch\n            -- \t\thighlight.Normal = { fg = \"#ffffff\", bg = \"#000000\" }\n            -- \telseif style == \"light\" then\n            -- \t\t-- change the default background of witch\n            -- \t\tcolors.bg = \"#ffffff\"\n\n            -- \t\t-- change the Normal highlight group of witch\n            -- \t\thighlight.Normal = { fg = \"#000000\", bg = \"#ffffff\" }\n            -- \tend\n            -- end,\n\n            --- @param style string : the current style of the theme\n            --- @param colors table : the current colors of the theme\n            --- @param highlight table : the current highlights of the theme\n            on_highlight = function(style, colors, highlight)\n            end,\n        },\n\n        -- dims inactive windows\n        dim_inactive = {\n            enabled = true,\n            -- from 0 to 1\n            -- as nearer to 1 the dimming will be lighter\n            level = 0.48,\n\n            -- Prevent dimming the last active window when switching to a window\n            -- with specific filetypes or buftypes listed in the excluded table.\n            --\n            -- The idea of this option is when change to a window like NvimTree, Telescope, ...\n            -- where these windows are considered auxiliary tools.\n            -- the last active window retains its status as the main window\n            -- and should not be dimmed upon switching.\n            excluded = {\n                filetypes = {\n                    NvimTree = true,\n                },\n                buftypes = {\n                    nofile = true,\n                    prompt = true,\n                    terminal = true,\n                },\n            },\n        },\n\n        -- true if you want to use command StinvimUISwitch\n        switcher = true,\n\n        -- add your custom themes here\n        more_themes = {\n\n            -- the key is the name of the theme must be in PascalCase\n            -- the value is the table of colors to be passed to the theme\n            -- with following format in witch.colors.example\n            -- Custom1 = {},\n            -- Custom2 = {},\n        },\n    }\n```\n\n## Commands\n\n| Command               | Description                                                           |\n| --------------------- | --------------------------------------------------------------------- |\n| `:Witch \u003ctheme_name\u003e` | Switch to the specified theme, fallback to default theme if not found |\n\n## Events\n\n| Event                | Description                                                                                                                                                   |\n| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `WitchHighlightDone` | This event is fired when witch has finished highlighting of a module. You can use this to reload highlight of some plugin such as NvimTree after change theme |\n\nExample:\n\n```lua\n    vim.api.nvim_create_autocmd({ \"User\" }, {\n        pattern = \"WitchHighlightDone\",\n        callback = function(event)\n            -- event.data is the name of the module that witch has finished highlighting\n            if event.data == \"nvimtree\" then\n                print(\"WitchHighlightDone nvimtree\")\n            end\n        end,\n    })\n```\n\n## Custom Highlight\n\nWith witch, you can easily add your custom highlight to the theme\nby creating a new module in some where in your config and add it to the `customs` option.\n\nThe module should has the structure like this: [example](./lua/witch/theme/example.lua)\n\n```lua\n    require(\"witch\").setup {\n        theme = {\n            customs = {\n                -- your module\n                require(\"witch.theme.example\"),\n                -- ...\n            },\n        },\n    }\n```\n\n🤗 We also provide some default highlight module that you can use to extend the theme\nsee [here](./lua/witch/theme/module).\nSo to enable these module, you can add the name of module to the `extras` option\n\n```lua\n    require(\"witch\").setup {\n        theme = {\n            extras = {\n                bracket = true,\n                dashboard = true,\n                diffview = true,\n                explorer = true,\n                indentline = true,\n            },\n        },\n    }\n```\n\n## Custom Theme\n\nWith witch, you can also add your custom theme to the theme.\n\n😢 Unfortunately, it's not really flexible you just can change the colors of the\ntable colors rigidly.\n\nYou can see the colors format in [here](./lua/witch/colors/example.lua)\n\nSo, if you have any idea to make it more flexible, please let me know.\n\n```lua\n    require(\"witch\").setup {\n        more_themes = {\n            -- the key is the name of the theme must be in PascalCase\n            Custom1 = {\n                bg = \"#161f31\", -- the background color\n                bg_dark = \"#0d1829\", -- the background color of floating windows\n                bg_line = \"#0d1829\", -- the background color of the statusline and tabline\n                bg_visual = \"#253557\", -- the background color of the visual selection\n                bg_highlight = \"#1f2b49\", -- the background color of the line the cursor is on\n                bg_gutter = \"#1b305d\", -- the background color of fold\n                bg_sidebar = \"#1b305d\", -- the background color of the sidebar, fallback to bf_dark if not defined\n\n                fg = \"#c9d8ee\", -- the foreground color\n                fg_dark = \"#a9bad6\", -- the foreground color of floating windows\n                fg_sidebar = \"#a9bad6\", -- the foreground color of the sidebar, fallback to fg_dark if not defined\n\n                yellow = \"#f0a421\",\n                yellow1 = \"#e6cc4c\",\n                bright_yellow = \"#ffc021\",\n\n                red = \"#dc4154\",\n                red1 = \"#ff5874\",\n                red2 = \"#ee4c96\",\n\n                cyan = \"#7dcfff\",\n                cyan1 = \"#75c8cc\",\n\n                black = \"#000000\",\n                white = \"#ffffff\",\n\n                green = \"#5bcf75\",\n\n                orange = \"#f99635\",\n                orange1 = \"#f78c6c\",\n                orange2 = \"#f78782\",\n                light_orange = \"#ffd59d\",\n\n                blue = \"#50bcef\",\n                blue1 = \"#629df2\",\n                blue2 = \"#698ff1\",\n\n                link = \"#8bdafe\",\n\n                teal = \"#5cd0a0\",\n\n                gray = \"#596683\",\n                graphite = \"#738eaf\",\n                light_gray = \"#64739a\",\n\n                pink = \"#f36cde\",\n                pink1 = \"#ed66c2\",\n\n                purple = \"#b278ea\",\n\n                brown = \"#c17e70\",\n\n                magenta = \"#da87ea\",\n                magenta1 = \"#ff3483\",\n\n                border = \"#3d88c4\",\n                dark_border = \"#37518d\",\n                graphite_border = \"#465968\",\n\n                comment = \"#6675ae\", -- the color of comments\n                string = \"#ffd39b\", -- the color of strings\n                operator = \"#7bc0cc\", -- the color of operators\n\n                error = \"#e64152\",\n                info = \"#59d1f2\",\n                warn = \"#ffcb44\",\n                hint = \"#1abc9c\",\n                todo = \"#f78c6c\",\n                unnecessary = \"#375172\",\n\n                -- if you want to change the terminal colors, you can do so here\n                -- the term_0 - term_15 colors has the priority over the term_black - term_bright_white colors\n                term_0 = \"#000000\",\n                term_8 = \"#4d4d4d\",\n\n                term_7 = \"#ffffff\",\n                term_15 = \"#ffffff\",\n\n                term_1 = \"#fc3753\",\n                term_9 = \"#fc3753\",\n\n                term_2 = \"#37a16f\",\n                term_10 = \"#4ad860\",\n\n                term_3 = \"#f0a421\",\n                term_11 = \"#f0a421\",\n\n                term_4 = \"#1e9eff\",\n                term_12 = \"#1e9eff\",\n\n                term_5 = \"#f36cde\",\n                term_13 = \"#f36cde\",\n\n                term_6 = \"#7dcfff\",\n                term_14 = \"#7dcfff\",\n\n                term_black = \"#000000\",\n                term_bright_black = \"#4d4d4d\",\n\n                term_white = \"#ffffff\",\n                term_bright_white = \"#ffffff\",\n\n                term_red = \"#fc3753\",\n                term_bright_red = \"#fc3753\",\n\n                term_green = \"#4ad860\",\n                term_bright_green = \"#4ad860\",\n\n                term_yellow = \"#f0a421\",\n                term_bright_yellow = \"#f0a421\",\n\n                term_blue = \"#1e9eff\",\n                term_bright_blue = \"#1e9eff\",\n\n                term_magenta = \"#f36cde\",\n                term_bright_magenta = \"#f36cde\",\n\n                term_cyan = \"#7dcfff\",\n                term_bright_cyan = \"#7dcfff\",\n            },\n\n            Custom2 = {\n                -- your colors\n            },\n        },\n    }\n```\n\n## Contributing\n\nBecause I follow minimalism, I just support the basic features that I use.\n\nIf you need more features, please feel free to open an issue or pull request\nwith and image or a video to show your color scheme.\n\nHope you enjoy it!\n\nI look forward to more highlight styles from you.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details\n","funding_links":[],"categories":["Colorscheme"],"sub_categories":["Assembly","Tree-sitter Supported Colorscheme"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsontungexpt%2Fwitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsontungexpt%2Fwitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsontungexpt%2Fwitch/lists"}