Skip to content

Latest commit

 

History

153 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

y9nika.nvim

Colorscheme focused on declarations rather than statements.

y9nika is my wife's nickname. This repo is a companion theme for my config at y9san9.nvim.

Flavor Dark Light
Default
Solar
Contrast
Less
Pickme
Coffee
Gruber Not available

Motivation

Most color schemes highlight everything they can, ending up looking like a fireworks show. That's fine for most of the people and it feels fancy. But it doesn't help to improve builtin human parser for stuff.

This colorscheme splits all the code into 3 categories:

  • Declarations
  • Statements
  • Junk

This colorscheme only highlights declarations. There is no reason to highlight statements since all the code is basically them. You will need to study them one-by-one anyways. But when searching for a declaration with your eye, highlighting might draw attention.

Only 3 classes of declarations are supported:

  • Local
  • Definition
  • Comment

Locals are defined within scope and are not accessible once this scope is left. The scope might be a function, loop, if condition or something else. Local variables and constants are all highlighted using @y9nika.variable.

Definition is something that is defined within namespace and is attached to it, rather than to scope. They are more important and therefore more noticeable. Functions, classes, interfaces, global variables, it all falls under that category and highlighted using @y9nika.declaration.

And comments are just... Comments. There is a trend to dim comments in nearly every colorscheme. In my opinion if author of the original code wanted to say you something, it should be noticeable. Perhaps that is the most important and high-level information. It is highlighted using @y9nika.marker.

Additionally:

  • y9nika.nvim reduces visibility of punctuation and standard language keywords (if, else, function, etc). They are usually least important and most obvious part of any program.

  • y9nika.nvim 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 y9nika.nvim 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.

  • y9nika.nvim 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 theme is heavily inspired by alabaster. With the difference that I reduced the amount of base colors to 6.

Usage

set termguiclors
colorscheme y9nika

Supported languages:

  • Lua
  • Go
  • Python
  • Julia
  • Kotlin
  • Java
  • Swift
  • JavaScript
  • TypeScript
  • CSS
  • HTML
  • VimScript
  • Markdown
  • Odin
  • Json
  • Git

Other languages have sensible defaults thanks to Neovim builtin queries, but they might not be polished and something may be highlighted poorly. You can learn specifically what needs to be adjusted here.

Configuration

It is easy to create custom theme via this "framework". Each flavor has just 6 colors to override. Take a look at the default theme definition, for example:

require("y9nika.core").apply {
    background = "#0e1415",
    foreground = "#dddddd",
    primary = "#71ade7",
    secondary = "#95cb82",
    muted = "#aaaaaa",
    marker = "#dfdf8e",
}

The rest is derived programmatically using some HUE-magic.

About

Neovim Theme with focus on Declarations rather than Statements.

Resources

Stars

48 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages