I’ve written a small Neovim plugin which might be useful to people who often work on several projects in parallel.

It activates a specific theme based on the project you are working on (the current directory you start Neovim from).

It allows you to define which themes should be used for which projects. The configuration is simple and allows specifying patterns for matching project names (not full regex, but what Lua supports).

My configuration looks something like this (this is in Fennel, for the Lua version, check out the readme):

:opts {
    :themes [
        { :matcher "radio" :theme "nordic" }
        { :matcher "^/kde" :theme "hybrid" }
        { :matcher "qt$"   :theme "moonfly" }
    ]
    :defaultTheme "habamax"
    :postExec {
        :moonfly [ ":hi TabLineSel guibg=#508050 guifg=#f0f0f0" ]
        :nordic  [ ":hi TabLineSel guibg=#5070f0 guifg=#f0f0f0" ]
        :hybrid  [ ":hi TabLineSel guibg=#80a020 guifg=#f0f0f0" ]
    }
}

The source code, and the instructions how to use it are available on GitLab.