Giter Club home page Giter Club logo

anderson.nvim's Introduction

Anderson Scheme

A port of anderson.vim color scheme for Neovim written in Lua.

Palette:

Screenshots:

Features

Installation

Note

This plugin requires Neovim >= 0.5.0

Install via your favourite package manager:

vim-plug

Plug 'HASSIIYY/anderson.nvim'

packer

use 'HASSIIYY/anderson.nvim'

lazy

{ 'HASSIIYY/anderson.nvim' },

Usage and Configuration

Load the color scheme and define the desired options:

-- values shown are defaults and will be used if not provided
require('anderson').setup({
  italics = true,             -- enable italics in general
  comments = {
    italics = true,           -- enable italic comments
  },
  background = {
    transparent = false,      -- set the background to transparent
  },
  float = {
    force_background = false, -- force background on floats even when background.transparent is set
    background_color = nil,   -- set color for float backgrounds. If nil, uses the default color set
                              -- by the color scheme
  },
  signs = {
    highlight = true,         -- whether to highlight signs
  },
  customize = nil,            -- customize the theme in any way you desire, see below what this
                              -- configuration accepts
})

Customization

In the configuration, you can set customize to a function to modify the theme on the fly. This value accepts a function that takes a highlight group name and some options, and returns some options.

The function signature is:

fun(group: string, options: table): table

Where both the options table and the return table are options as described in the nvim_set_hl val parameter.

For instance, in order to disable bold usage on the entire color scheme, you can use

require('anderson').setup({
  customize = function(_, o)
    o.bold = false
    return o
  end,
})

Or if you want to change the coloring from a specific highlight group, in this case set the current line number to a bold orange instead of the default grey:

-- get colors from the colorscheme for current background and "medium" contrast
local colors = require("anderson.colors")

require('anderson').setup({
  customize = function(g, o)
    if g == "CursorLineNr" then
      o.link = nil            -- wipe a potential link, which would take precedence over other
                              -- attributes
      o.fg = colors.orange    -- or use any color in "#rrggbb" hex format
      o.bold = true
    end
    return o
  end,
})

anderson.nvim's People

Contributors

f4z3r avatar wittyjudge avatar hassiiyy avatar parilia avatar dot-1q avatar logan-connolly avatar fractal-robot 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.