Giter Club home page Giter Club logo

alabaster.nvim's Introduction

Alabaster Color Scheme

A color scheme with minimal amount of highlighting for neovim.

Motivation

(from the original sublime text theme)

Most color schemes highlight everything they can, ending up looking like a fireworks show.

Instead, Alabaster uses minimal highlighting; it defines just four classes:

  1. Strings
  2. All statically known constants (numbers, symbols, keywords, boolean values)
  3. Comments
  4. Global definitions

Additionally:

  • Alabaster does not highlight standard language keywords (if, else, function, etc). They are usually least important and most obvious part of any program.

  • Alabaster highlights comments. Most schemes try to dim comments by using low-contrast greys. I think if code was complex enough that it deserved an explanation then it’s that explanation we should see and read first. It would be a crime to hide it.

  • Alabaster doesn’t use font variations. It’s hard to scan code when it jumps between normal, bold and italics all the time. Also, not all fonts provide bold/italics variants.

  • Having minimal amount of rules means you can consciously use them to look for the exact piece of information you need. Most other “fireworks” schemes provide only one meaningful contribution: if it’s colored it’s probably syntactically correct. Instead, in Alabaster you can actually remember all the rules, and e.g. if you need to look for a string you know that you’re looking for a green token. And all the strings really pop out because there are not many other things highlighted.

  • Alabaster only highlights things that parser could identify reliably. I believe that if highlighting works only partially then it does more harm than good. When highlighting works reliably, your brain learns to rely on it. When it’s not reliable, your brain spends precious brain cycles to re-check everything it sees on the screen.

NOTE

This is designed with nvim-treesitter in mind (there is some highlighting of the default highlight groups but the intended use is with treesitter). nvim-tressitter is an unstable plugin which may introduce breaking changes -- which can break this plugin -- at any time. Queries for some languages are bundled. Please contribute queries if you can, following these rules

Usage

set termguiclors
colorscheme alabaster

The TUI will likely detect your terminal background and set background accordingly. If you want to force light or dark mode, use set background=dark or set background=light

Configuration

Two config options are provided:

  • g:alabaster_dim_comments (default: false). When true, comments are dimmed instead of being highlighteed bright yellow.
  • g:alabaster_floatborder (default: false). When true, floating window borders have a foreground colour and background colour is the same as Normal. When false, floating window borders have no foreground colour and background colour is the same as popup menus.

Themed plugins

Screenshots

Rust rust-dark rust-light

Telescope telescope-dark telescope-light

Neogit (also shows DiffAdd and DiffDelete highlight groups) swappy-20220130-112712

diffview.nvim (also shows DiffChange and DiffText highlight groups) swappy-20220130-112534

C++ cpp-dark cpp-light

Fennel fennel-dark fennel-light

Clojure (same code and font as the one on the original ST theme's README for comparison) (blue and magenta are switched in the original screenshot, the current ST theme matches this one) image

Help help-dark help-light

Alabaster dark for other tools

Thanks

projekt0n/github-nvim-theme for diff colours

alabaster.nvim's People

Contributors

p00f avatar rktjmp avatar eotsn avatar s1dsq avatar zorbn avatar

Watchers

 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.