Giter VIP home page Giter VIP logo

base16-nvim's Introduction

base16-nvim

A Lua port of base16-vim for Neovim.

Update procedure

In order to always be testing the latest and greatest version of these color schemes, I add this repo as a submodule to my dotfiles repository, and work out of there. The script for actually rebuilding schemes is stored in the superproject.

Tracking upstream template updates

Examples of "backports" of changes made in base16-vim:

The basic pattern is:

  1. Make the changes to the templates/default.mustache template in this repo (ie. in the submodule). This requires a decision for how to port the Vimscript of each upstream change into Lua.

  2. Copy the new template up to the superproject's working area by running this (from the superproject root):

    cp \
      aspects/nvim/files/.config/nvim/pack/bundle/opt/base16-nvim/templates/default.mustache \
      vendor/base16-templates/base16-nvim/templates
    
  3. Run NO_CLONE=1 support/base16-builder.rb in the superproject. The NO_CLONE stops the changed template that was copied in the previous step from being updated.

  4. Commit the changes in the base16-nvim submodule:

    cd aspects/nvim/files/.config/nvim/pack/bundle/opt/base16-nvim
    git commit -p
    git push
    cd -
    
  5. Produce a dotfiles commit (example: d0da206692f96e19):

    git add aspects/nvim/files/.config/nvim/pack/bundle/opt/base16-nvim
    git commit
    
  6. Clean up the working area in the superproject:

    cd vendor/base16-templates/base16-nvim
    git fetch
    git reset --hard origin/main
    cd -
    

Tracking upstream scheme updates

Examples of updating when new schemes are added, or existing schemes changed, upstream:

These updates are straightforward:

  1. In my dotfiles, update the list of templates and the list of schemes:

    (cd vendor/base16-templates-source && git pull)
    (cd vendor/base16-schemes-source && git pull)
    
  2. Run support/base16-builder.rb.

  3. Commit the changes in my base16-nvim submodule:

    cd aspects/nvim/files/.config/nvim/pack/bundle/opt/base16-nvim
    git commit -p
    git push
    cd -
    
  4. Produce a dotfiles commit (example: 7b26cdbf8ee35459):

    git add aspects/nvim/files/.config/nvim/pack/bundle/opt/base16-nvim
    git add vendor/base16-{templates,schema}-source
    git commit
    

base16-nvim's People

Contributors

wincent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

vinitkumar

base16-nvim's Issues

Support for 256 colorspace

Hi @wincent, I am your big fan and your screencasts and dotfiles repo inspires me a lot :)
So thank you for that!

I have a question related to your version of base16 colorschemes.
It seems like Lua version of colorschemes misses the part of code responsible for supporting of 256 colorspace.
If we check for example 3024 colorscheme we will notice that Lua version for some cterms looks in the following way

local cterm01 = "10"
local cterm02 = "11"
local cterm04 = "12"
local cterm06 = "13"
local cterm09 = "09"
local cterm0F = "14"

Whereas Vimscript version has a switch to adjust cterms to 256 colorspace

if exists("base16colorspace") && base16colorspace == "256"
  let s:cterm01        = "18"
  let g:base16_cterm01 = "18"
  let s:cterm02        = "19"
  let g:base16_cterm02 = "19"
  let s:cterm04        = "20"
  let g:base16_cterm04 = "20"
  let s:cterm06        = "21"
  let g:base16_cterm06 = "21"
  let s:cterm09        = "16"
  let g:base16_cterm09 = "16"
  let s:cterm0F        = "17"
  let g:base16_cterm0F = "17"
else
  let s:cterm01        = "10"
  let g:base16_cterm01 = "10"
  let s:cterm02        = "11"
  let g:base16_cterm02 = "11"
  let s:cterm04        = "12"
  let g:base16_cterm04 = "12"
  let s:cterm06        = "13"
  let g:base16_cterm06 = "13"
  let s:cterm09        = "09"
  let g:base16_cterm09 = "09"
  let s:cterm0F        = "14"
  let g:base16_cterm0F = "14"
endif

As a result when I tried to switch to Lua version I am getting weird colors in my vim.
Was that part missed intentionally and I need to adjust somehow my environment to get it working as it was working with vimscript colorschemes?

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.