lourenci/github-colors

github github
tree-sitter-supported-colorscheme
star 50
stars
alert-circle 1
open issues
users 2
subscribers
git-branch 2
forks
CREATED

2021-05-21

UPDATED

11 hours ago


🐙 Yet another GitHub colorscheme

I've tried a lot of themes trying to reproduce the GitHub one, but all of them fall trying to reproduce them. This is my attempt.

Please, don't expect me to solve your issues. I don't make OSS for living. As I use this colorscheme in daily-basis, I'll try to keep it updated with the GitHub colors as soon as possible. Feel free to open a PR and get it merged.

Why this one is different?

GitHub uses tree-sitter to parse the source code and to colorize them. This is the reason why it's so hard to reproduce its colors. With nvim 0.5 we can do the same thing, theoretically.

Features

  • Light color
  • Dim (soft dark) color
  • tree-sitter syntax
  • True color only

Setup

How we need to leverage tree-sitter so we can't support vim or nvim 0.4, though you can try it since we use the "tree-sitter <> vim" bindings highlights when is possible. I don't have any plans to try to port it for the mentioned ones.

use {
  'nvim-treesitter/nvim-treesitter',
  run = ':TSUpdate',
  config = function()
    require'nvim-treesitter.configs'.setup {
      highlight = {
        enable = true,
      }
    }
  end,
}
use 'lourenci/github-colors'
syntax on
set termguicolors
set background=light " or set background=dark
colorscheme github-colors

Examples

  • Ruby - GitHub <> Colorscheme

  • TypeScript - GitHub <> Colorscheme