Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

nvchad theme plugin

License

NotificationsYou must be signed in to change notification settings

sefidel/nvim-base16.lua

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Programmatic lua library for settingbase16 themes inNeovim.

(Note: This theme plugin is supposed to be used along withNvChad only so watchout!)

Usage

Install via your plugin manager. e.g.

Plug"NvChad/nvim-base16.lua"

Basic usage

lua<<EOFlocalbase16=require'base16'base16(base16.themes("brewer"),true)EOF

This is how I use it. Usesnorcalli/nvim.lua.

lua<<EOFnvim=require'nvim'localbase16=require'base16'base16(base16.themes[nvim.env.BASE16_THEMEor"3024"],true)EOF

You can define your own themes and use them with thebase16 function as long as they match the format described below. I know the format is annoying to define, so thebase16.theme_from_array utility function is available.

API

base16.apply_theme(theme_definition: dict, use_256_colorspace: bool)

base16(theme_definition: dict, use_256_colorspace: bool)

Alias forbase16.apply_theme(theme_definition: dict, use_256_colorspace: bool).

Example:

base16(base16.themes("brewer"),true)

base16.theme_from_array(theme_definition: array) -> dict

Formats an array of 16 hex color strings into a dictionary suitable for use withbase16.apply_theme.

Example:

localtheme=base16.theme_from_array {"383838";"404040";"606060";"6f6f6f";"808080";"dcdccc";"c0c0c0";"ffffff";"dca3a3";"dfaf8f";"e0cf9f";"5f7f5f";"93e0e3";"7cb8bb";"dc8cc3";"000000";}base16(theme,true)

Variables

base16.themes

Dictionary of definitions to be used bybase16 orbase16.apply_theme.

Example:

base16.themes["zenburn"]== {base00="383838";base01="404040";base02="606060";base03="6f6f6f";base04="808080";base05="dcdccc";base06="c0c0c0";base07="ffffff";base08="dca3a3";base09="dfaf8f";base0A="e0cf9f";base0B="5f7f5f";base0C="93e0e3";base0D="7cb8bb";base0E="dc8cc3";base0F="000000";}

Notes

Because this includes a copy ofnorcalli/nvim.lua, you should put this afternorcalli/nvim.lua in the plugin list because lua module resolution is first-come-first-served, i.e.

Plug"norcalli/nvim.lua"Plug"norcalli/nvim-base16.lua"

Credits

Chris Kempson andBase16 andbase16-vim

About

nvchad theme plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua100.0%

[8]ページ先頭

©2009-2025 Movatter.jp