Code Monkey home page Code Monkey logo

last-color.nvim's Introduction

๐ŸŽจ Last Color

Last Color saves the name of the last (successful) colorscheme change to your filesystem and allows you to recall it whenever you desire. As such, you can automatically set your colorscheme between sessions based on what you last used! See the usage section for an example.

Why?

I'm extremely indecisive when choosing my colorscheme. I considered setting up my colors in a .gitignored file, but telescope's colorscheme picker is way too convenient compared to editing a file ๐Ÿต

Installation

Ye olde plugin manager.

-- packer
use({ 'raddari/last-color.nvim' })

Configuration

None. It'll call setup itself when loaded.

Usage

Dead simple. I use the snippet below in my init.lua to automatically use the last theme. There's also an Ex command; :LastColor.

-- default theme as a backup, `recall()` can return `nil`.
local theme = require('last-color').recall() or 'default'
vim.cmd.colorscheme(theme)

I personally don't lazy load my plugins, but I'm sure you could modify the snippet to account for that ๐Ÿ˜€

Showcase

Using the lua snippet above:

last-color

Issues

Please open an issue for any problems you encounter, or suggestions for improving the code quality. This is my first plugin, so I'm still learning and looking to improve ๐Ÿ˜

last-color.nvim's People

Contributors

raddari avatar raffaem avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.