raddari / last-color.nvim

Remember your last call to :colorscheme between restarts
GNU General Public License v3.0
17 stars 2 forks source link

Feat: Persist colorscheme in each working directory #1

Open sergiornelas opened 2 years ago

sergiornelas commented 2 years ago

Hello! I'm really happy using your new creation, but will be possible if you can save the last used color scheme by cwd? For example, I have a project at ~/notes where I use gruvbox theme, and I have a different project at ~/project and I want to set kanagawa to that specific working directory.

That will be amazing, ty!

raddari commented 2 years ago

Hi Sergio, glad you're enjoying this plugin! Great suggestion - I'll look into this during the uni break :)

What I'm thinking is to store colorschemes in a per-cwd table, and have require('last-color').recall() optionally take a string parameter to the cwd. This would allow integration with plugins such as workspaces.nvim too - I'm hoping it would end up looking something like:

require("workspaces").setup({
  hooks = {
    open = function(_, path)
      require('last-color').recall(path)
    end,
  },
})