LunarVim/colorgen-nvim

Missing Features / Future Ideas

titaniumtraveler opened this issue · 1 comments

A small list of missing features / possible improvements to colorgen-nvim, collected here to gather other opinions and ideas.

  • Improvements for the CLI
    • Multi input
      Enable generating multiple Colorschemes at once.
      Instead of only ever accepting one colorscheme at a time
      colorgen-nvim user-template.toml
      it should be possible to generate multiple at once
      colorgen-nvim user-template1.toml user-template2.toml user-template3.toml
    • Supporting other input formats
      Now that colorgen-nvim is rewritten to use serde, it would
      be trivial to add support for other configuration formats like json and yaml.
    • Specify path the colorscheme is generated to
      Instead of always generating colorschemes relative to the
      working directory it would be nice to have a --path <PATH>
      option to override the path the colorscheme is generated in.
  • Reworking the library API
    While the current code works and is reasonably well ordered. I have
    the feeling that it could be done better to give a better overview
    over the available API to make it more usable as a library-crate. That also includes adding documentation, usage
    examples, and ideally tests.
    • Find a better, more discoverable API.
    • Add documentation (This should include code examples.)
    • Add tests
    • When done with this publish a new version to https://crates.io/
  • Conditional Compilation
    Add multiple features to eliminate not needed dependencies.
    Users only using the library shouldn't have to have for example clap in their
    dependency-chain.
  • Improved error handling and error reporting
    It would be nice to have a more coherent error handling story and to
    be able to point the user to the exact point of failure.
  • Build a nvim plugin that automatically downloads the binary, builds
    the colorscheme from a configured file and loads the colorscheme.
    • Proposed API:
      require "nvim-colorscheme".setup {
        -- Path of the file the colorscheme is generated from
        path = vim.env["HOME"] .. "nvim_config/colorscheme.toml",
        -- automatically reload colorscheme on changes
        autoreload = true,
      }
      uses BufWritePost as autocommand event and executes the following:
      • uses nvim-colorgen <path> to generate the colorscheme
      • and then reloads the colorscheme itself

Build a nvim plugin that automatically downloads the binary, builds
the colorscheme from a configured file and loads the colorscheme.

For whom is interested, I implemented this in the autoscheme.nvim plugin.