Skip to content

projekt0n/caret.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

caret.nvim

The timeless colorscheme for neovim text editor.


The primary focus of the 'caret' color scheme is to provide a user-friendly and visually pleasing coding color scheme for colorblind and normal developers.

This project was initiated during my pursuit of a computer science education. Leveraging the rich heritage of my family's Bandhani (tie-dye textile) craftsmanship, which spans seven generations, I have seamlessly integrated this legacy of expertise into the creation of this color scheme.

Work in Progress: Why?

This color scheme is actively under development, and the final colors have not yet been confirmed. Minor adjustments might occur in future updates. As development is ongoing, creating ports for other platforms is currently impractical.

However, a separate repository under the projekt0n organization will maintain Terminal themes, ports, and additional themes once a stable version is released. The Terminal themes will remain static, while the Neovim theme is planned to be real-time AI-generated. This aims to improve code visibility for various programming languages and generate colors by understanding code.

The current state of the color scheme is comparable to oudh. Initial usage might not be instantly appealing. However, upon testing alternatives and making comparisons, you may find it intriguing.

Sponsorware

After dedicating approximately 3 years to the ongoing development of this colorscheme, I am considering the option of setting a sponsorship threshold and, upon reaching it, making release freely available to the world!

This approach would allow users and organizations to contribute to the continuous development, maintenance, quicker release of upcoming versions, and potential ports. Your support would be highly appreciated.

shoutout-sponsors

Features

  • Supports the latest Neovim>=0.5 features like Treesitter and LSP
  • Vim terminal colors
  • Support for multiple plugins
    • And many others should 'just work'!
  • Meticulously chosen colors for comfortable coding in various conditions
  • Inclusive design aids colorblind and normal vision coders' visibility

Requirements

  • Neovim >= 0.7.0
  • True color support
  • Undercurl terminal support (optional)

Installation

Install the theme with your preferred package manager:

Install with vim-plug:

Plug 'projekt0n/caret.nvim'

Or with dein:

call dein#add('projekt0n/caret.nvim')

Or with minpac:

call minpac#add('projekt0n/caret.nvim')

Or with Packer.nvim:

Add this in your init.lua or plugins.lua

-- Install without configuration
use ({ 'projekt0n/caret.nvim' })

-- Or with configuration
use({
  'projekt0n/caret.nvim',
  config = function()
    require('caret').setup({
      -- ...
    })

    vim.cmd('colorscheme caret')
  end
})

Or with lazy.nvim:

Add this in your init.lua or plugins.lua

-- Install without configuration
{ 'projekt0n/caret.nvim' }

-- Or with configuration
{
  'projekt0n/caret.nvim',
  lazy = false, -- make sure we load this during startup if it is your main colorscheme
  priority = 1000, -- make sure to load this before all the other start plugins
  config = function()
    require('caret').setup({
      -- ...
    })

    vim.cmd('colorscheme caret')
  end,
}

Usage

Simply set the colorscheme with the builtin command :colorscheme

colorscheme caret
vim.cmd('colorscheme caret')

Screenshots

Caret Dark

vim.o.background = 'dark'
vim.cmd('colorscheme caret')

caret_dark

Caret Light

vim.o.background = 'light'
vim.cmd('colorscheme caret')

caret_light

Configuration

There is no need to call setup if you don't want to change the default options and settings.

-- Default options
require('caret').setup({
  options = {
    transparent = false,       -- Set to true to disable background setting
    inverted_signs = false,    -- Controls inverted Signcolumn highlighting
    styles = {                 -- Define styles for various syntax groups
      bold = true,
      italic = true,
      strikethrough = true,
      undercurl = true,
      underline = true,
    },
    inverse = {                -- Determines inverse highlights for different types
      match_paren = false,
      visual = false,
      search = false,
    },
  },
  mapping = {                  -- Configure key mappings
    toggle_bg = nil,           -- Assign a specific key for toggling background
  },
  groups = {},                 -- Override default highlight groups here
})

-- setup must be called before loading
vim.opt.background = 'dark'
vim.cmd('colorscheme caret')

Supported Plugins

TODO

  • Support more plugins
  • Enhance syntax highlighting
  • Ports
  • Generate syntax colors using AI to improve code visibility for each file and file format

Development Guidelines

  • Avoid adding/requesting unnecessary features to the codebase.
  • Modularize the code to enhance comprehensibility.
  • Support older Neovim versions as much as possible.
  • Refrain from implementing hyped features into this colorscheme without prior discussion.
  • Take colorblindness into consideration when making color-related changes.
  • Have a Fun!

Contributing

See CONTRIBUTING.md

Copying

This project is released under the terms of the MIT license.

See LICENCE for more information or see opensource.org