Moondust

Handcrafted theme for those who have not found syntax highlighting useful for themself.

import { dequal } from 'dequal';
import { compare, lines } from 'uvu/diff';

function dedent(str) {
	str = str.replace(/\r?\n/g, '\n');
  let arr = str.match(/^[ \t]*(?=\S)/gm);
  let i = 0, min = 1/0, len = (arr||[]).length;
  for (; i < len; i++) min = Math.min(min, arr[i].length);
  return len && min ? str.replace(new RegExp(`^[ \\t]{${min}}`, 'gm'), '') : str;
}

export class Assertion extends Error {
	constructor(opts={}) {
		super(opts.message);
		this.name = 'Assertion';
		this.code = 'ERR_ASSERTION';
		if (Error.captureStackTrace) {
			Error.captureStackTrace(this, this.constructor);
		}
		this.details = opts.details || false;
		this.generated = !!opts.generated;
		this.operator = opts.operator;
		this.expects = opts.expects;
		this.actual = opts.actual;
	}
}
View details JavaScript

Moondust is available on the VSCode Marketplace, Open VSX Registry, and GitHub Releases.

Motivation

Early on in my programming journey, syntax highlighting aided my understanding the coding. However, as I gained more experience, I found myself relying less on it. Eventually, I realized that the abundance of colors was very straining on my eyes and made it difficult to focus and concentrate.

Moondust is crafted to reduce eye strain, allowing to focus on code. It challenges the conventional approach of highlighting keywords and typical structures. Instead of drawing excessive attention to them, this theme brings business logic to the forefront. Avoiding a vibrant color palette further helps maintain the focus.

Discussions

For a more in-depth discussion on the issues associated with the current approach to syntax highlighting, recommend reading the articles A case against syntax highlighting and Syntax highlighting is a waste of an information channel.

Syntaxes

Moondust is tailored for each syntax individually. At present, it supports CSS, Dockerfile, fish, Go, Go Module, Go Sum, HTML, INI, JavaScript, JSON, JSON with Comments, JSON Lines, JSX, Makefile, Ruby, Rust, Shell Script, SQL, Swift, TOML, TypeScript, TSX, and YAML. For a detailed demonstration of syntax highlighting, feel free to navigate to the respective syntax.

Acknowledgments

In the initial phase, Moondust was primarily a modification of the GitHub Theme. I owe a great deal of gratitude to the Primer team for their work.

A special shout-out goes to the entire community that focuses on creating minimalistic, two-color, monochrome themes, particularly Monochrome. It was a delight for me to delve into your work, and it is heartening to realize that our aesthetic preferences align closely.