Compare commits
No commits in common. "paper-tonic" and "master" have entirely different histories.
paper-toni
...
master
48
README.md
48
README.md
|
@ -1,4 +1,4 @@
|
||||||
# nvim-paper-tonic
|
# nvim-highlite
|
||||||
|
|
||||||
## Default Settings Preview
|
## Default Settings Preview
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
`nvim-paper-tonic` is a colorscheme template repository for Neovim 0.5+.
|
`nvim-highlite` is a colorscheme template repository for Neovim 0.5+.
|
||||||
|
|
||||||
This template's _defaults_ focus on:
|
This template's _defaults_ focus on:
|
||||||
|
|
||||||
|
@ -32,12 +32,12 @@ The only prerequisite is Neovim 0.5+
|
||||||
|
|
||||||
### Creating Your Own
|
### Creating Your Own
|
||||||
|
|
||||||
1. Fork this repository, or clone it with `git clone https://github.com/Iron-E/nvim-paper-tonic`.
|
1. Fork this repository, or clone it with `git clone https://github.com/Iron-E/nvim-highlite`.
|
||||||
2. Follow the instructions in [`colors/paper-tonic.vim`](colors/paper-tonic.vim).
|
2. Follow the instructions in [`colors/highlite.vim`](colors/highlite.vim).
|
||||||
* If you are on a Unix system, use the [setup script](setup.sh) like so:
|
* If you are on a Unix system, use the [setup script](setup.sh) like so:
|
||||||
```sh
|
```sh
|
||||||
chmod +x ./setup.sh
|
chmod +x ./setup.sh
|
||||||
./setup.sh paper-tonic <colorscheme>
|
./setup.sh highlite <colorscheme>
|
||||||
```
|
```
|
||||||
Where `<colorscheme>` is the name of your desired colorscheme.
|
Where `<colorscheme>` is the name of your desired colorscheme.
|
||||||
* If you are on Windows, rename the files manually.
|
* If you are on Windows, rename the files manually.
|
||||||
|
@ -61,7 +61,7 @@ Whenever you want to update from then on, you can run the [update script](update
|
||||||
|
|
||||||
return require('packer').startup {function(use)
|
return require('packer').startup {function(use)
|
||||||
use {'wbthomason/packer.nvim', opt=true}
|
use {'wbthomason/packer.nvim', opt=true}
|
||||||
use 'Iron-E/nvim-paper-tonic'
|
use 'Iron-E/nvim-highlite'
|
||||||
end}
|
end}
|
||||||
```
|
```
|
||||||
2. Specify this colorscheme as your default colorscheme in the `init.vim`:
|
2. Specify this colorscheme as your default colorscheme in the `init.vim`:
|
||||||
|
@ -70,29 +70,29 @@ Whenever you want to update from then on, you can run the [update script](update
|
||||||
" This plugin is fully compatible with 8-bit, 16-bit, and 24-bit colors.
|
" This plugin is fully compatible with 8-bit, 16-bit, and 24-bit colors.
|
||||||
set termguicolors
|
set termguicolors
|
||||||
" Use the colorscheme
|
" Use the colorscheme
|
||||||
colorscheme paper-tonic
|
colorscheme highlite
|
||||||
```
|
```
|
||||||
Or using `init.lua`:
|
Or using `init.lua`:
|
||||||
```lua
|
```lua
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
vim.api.nvim_command 'colorscheme paper-tonic'
|
vim.api.nvim_command 'colorscheme highlite'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
This repository in itself is an example of how to use `nvim-paper-tonic`. Aside from this, the following colorschemes are built using `nvim-paper-tonic`:
|
This repository in itself is an example of how to use `nvim-highlite`. Aside from this, the following colorschemes are built using `nvim-highlite`:
|
||||||
|
|
||||||
* (if you use this, open an issue and I'll add it here!)
|
* (if you use this, open an issue and I'll add it here!)
|
||||||
|
|
||||||
### As Dependency
|
### As Dependency
|
||||||
|
|
||||||
Below is an example of how to use `nvim-paper-tonic` as a dependency.
|
Below is an example of how to use `nvim-highlite` as a dependency.
|
||||||
|
|
||||||
* See `:h paper-tonic-usage` for more.
|
* See `:h highlite-usage` for more.
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
-- Import nvim-paper-tonic
|
-- Import nvim-highlite
|
||||||
local paper-tonic = require('paper-tonic')
|
local highlite = require('highlite')
|
||||||
|
|
||||||
-- First, define some colors
|
-- First, define some colors
|
||||||
local red = {'#FF0000', 1, 'red'}
|
local red = {'#FF0000', 1, 'red'}
|
||||||
|
@ -100,23 +100,23 @@ local black = {'#000000', 0, 'black'}
|
||||||
local white = {'#FFFFFF', 255, 'white'}
|
local white = {'#FFFFFF', 255, 'white'}
|
||||||
|
|
||||||
-- Highlight 'Identifier'
|
-- Highlight 'Identifier'
|
||||||
paper-tonic.highlight('Identifier', {bg=red, fg=black, style='bold'})
|
highlite.highlight('Identifier', {bg=red, fg=black, style='bold'})
|
||||||
|
|
||||||
-- Highlight 'Function' conditionally according to background color.
|
-- Highlight 'Function' conditionally according to background color.
|
||||||
paper-tonic.highlight('Function', {bg=black, fg=red, light={bg=white}})
|
highlite.highlight('Function', {bg=black, fg=red, light={bg=white}})
|
||||||
|
|
||||||
-- Link 'Example' to 'Identifier'
|
-- Link 'Example' to 'Identifier'
|
||||||
paper-tonic.highlight('Example', 'Identifier')
|
highlite.highlight('Example', 'Identifier')
|
||||||
|
|
||||||
-- You can also reference specific attributes of another highlight group.
|
-- You can also reference specific attributes of another highlight group.
|
||||||
paper-tonic.highlight('AnotherExample', {bg=paper-tonic.group'SpellBad'.bg, fg=white})
|
highlite.highlight('AnotherExample', {bg=highlite.group'SpellBad'.bg, fg=white})
|
||||||
```
|
```
|
||||||
|
|
||||||
### As Template
|
### As Template
|
||||||
|
|
||||||
Below is an example of how to use `nvim-paper-tonic` as a template.
|
Below is an example of how to use `nvim-highlite` as a template.
|
||||||
|
|
||||||
* See [`paper-tonic.vim`](colors/paper-tonic.vim) for more.
|
* See [`highlite.vim`](colors/highlite.vim) for more.
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
-- First, define some colors
|
-- First, define some colors
|
||||||
|
@ -146,7 +146,7 @@ local highlight_groups = {
|
||||||
When using this plugin, it is important to know that you can't just run `:hi` on a highlight group and expect that its changes will be retained. You must attach them to the `ColorScheme` `autocmd` event, as shown below:
|
When using this plugin, it is important to know that you can't just run `:hi` on a highlight group and expect that its changes will be retained. You must attach them to the `ColorScheme` `autocmd` event, as shown below:
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
packadd nvim-paper-tonic
|
packadd nvim-highlite
|
||||||
set termguicolors "optional
|
set termguicolors "optional
|
||||||
|
|
||||||
" WRONG! Don't do this.
|
" WRONG! Don't do this.
|
||||||
|
@ -154,14 +154,14 @@ hi! Error guifg=#000000 guibg=#FFFFFF
|
||||||
|
|
||||||
" Do this instead.
|
" Do this instead.
|
||||||
augroup Highlite
|
augroup Highlite
|
||||||
" You can also use `paper-tonic.highlight()` instead of `:hi!`
|
" You can also use `highlite.highlight()` instead of `:hi!`
|
||||||
autocmd ColorScheme paper-tonic hi! Error guifg=#000000 guibg=#FFFFFF
|
autocmd ColorScheme highlite hi! Error guifg=#000000 guibg=#FFFFFF
|
||||||
augroup end
|
augroup end
|
||||||
|
|
||||||
colorscheme paper-tonic
|
colorscheme highlite
|
||||||
```
|
```
|
||||||
|
|
||||||
Of course, substitute `paper-tonic` with the name of your colorscheme.
|
Of course, substitute `highlite` with the name of your colorscheme.
|
||||||
|
|
||||||
> Why am I receiving `E5108: Error executing lua [string ":lua"]:1: module '<colorscheme>' not found`?
|
> Why am I receiving `E5108: Error executing lua [string ":lua"]:1: module '<colorscheme>' not found`?
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,58 +1,58 @@
|
||||||
*paper-tonic.txt* Plugin for maintaining colorschemes
|
*highlite.txt* Plugin for maintaining colorschemes
|
||||||
*paper-tonic*
|
*highlite*
|
||||||
|
|
||||||
Author: Iron-E – https://github.com/Iron-E & https://gitlab.com/Iron_E
|
Author: Iron-E – https://github.com/Iron-E & https://gitlab.com/Iron_E
|
||||||
Web: https://github.com/Iron-E/nvim-paper-tonic
|
Web: https://github.com/Iron-E/nvim-highlite
|
||||||
|
|
||||||
|paper-tonic| is a plugin for creating and maintaining colorschemes. It can
|
|highlite| is a plugin for creating and maintaining colorschemes. It can
|
||||||
be configured by cloning the repository and following the README, or
|
be configured by cloning the repository and following the README, or
|
||||||
individually used to comprehensively highlight groups with its functions.
|
individually used to comprehensively highlight groups with its functions.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
TABLE OF CONTENTS *paper-tonic-toc*
|
TABLE OF CONTENTS *highlite-toc*
|
||||||
|
|
||||||
1. Requirements ............ |paper-tonic-requirements|
|
1. Requirements ............ |highlite-requirements|
|
||||||
2. Usage ................... |paper-tonic-usage|
|
2. Usage ................... |highlite-usage|
|
||||||
3. FAQ ..................... |paper-tonic-faq|
|
3. FAQ ..................... |highlite-faq|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
REQUIREMENTS *paper-tonic-requirements*
|
REQUIREMENTS *highlite-requirements*
|
||||||
|
|
||||||
- Neovim 0.5+
|
- Neovim 0.5+
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
USAGE *paper-tonic-usage*
|
USAGE *highlite-usage*
|
||||||
|
|
||||||
*paper-tonic.group()*
|
*highlite.group()*
|
||||||
`paper-tonic`.group({group_name}) *paper-tonic-group()*
|
`highlite`.group({group_name}) *highlite-group()*
|
||||||
|
|
||||||
Convert a pre-existing |highlight-group| into a format that |paper-tonic|
|
Convert a pre-existing |highlight-group| into a format that |highlite|
|
||||||
recognizes.
|
recognizes.
|
||||||
|
|
||||||
Note: the |highlight-group| must have been either:
|
Note: the |highlight-group| must have been either:
|
||||||
- |:highlight|ed.
|
- |:highlight|ed.
|
||||||
- |paper-tonic-highlight|ed.
|
- |highlite-highlight|ed.
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{group_name} A `string` which is the |highlight-group| to convert.
|
{group_name} A `string` which is the |highlight-group| to convert.
|
||||||
|
|
||||||
Return: ~
|
Return: ~
|
||||||
- A `table` which can be used as the {attributes} parameter for
|
- A `table` which can be used as the {attributes} parameter for
|
||||||
|paper-tonic.highlight()|.
|
|highlite.highlight()|.
|
||||||
|
|
||||||
Example: ~
|
Example: ~
|
||||||
>
|
>
|
||||||
local paper-tonic = require('paper-tonic')
|
local highlite = require('highlite')
|
||||||
|
|
||||||
-- get the 'Error' highlight group
|
-- get the 'Error' highlight group
|
||||||
local hl_error = paper-tonic.group('Error')
|
local hl_error = highlite.group('Error')
|
||||||
|
|
||||||
-- Define 'ErrorMsg' as foreground = background of 'Error'
|
-- Define 'ErrorMsg' as foreground = background of 'Error'
|
||||||
paper-tonic.highlight('ErrorMsg', {fg=hl_error.bg, bg=BG})
|
highlite.highlight('ErrorMsg', {fg=hl_error.bg, bg=BG})
|
||||||
<
|
<
|
||||||
|
|
||||||
*paper-tonic.highlight()*
|
*highlite.highlight()*
|
||||||
`paper-tonic`.highlight({group}, {attributes}) *paper-tonic-highlight()*
|
`highlite`.highlight({group}, {attributes}) *highlite-highlight()*
|
||||||
|
|
||||||
Highlight some {group} according to its {attributes}.
|
Highlight some {group} according to its {attributes}.
|
||||||
|
|
||||||
|
@ -81,22 +81,22 @@ USAGE *paper-tonic-usa
|
||||||
|
|
||||||
Example: ~
|
Example: ~
|
||||||
>
|
>
|
||||||
local paper-tonic = require('paper-tonic')
|
local highlite = require('highlite')
|
||||||
|
|
||||||
local yellow = {'#f0df33', 220, 'yellow'}
|
local yellow = {'#f0df33', 220, 'yellow'}
|
||||||
|
|
||||||
-- Highlight a new group
|
-- Highlight a new group
|
||||||
paper-tonic.highlight('Todo', {fg=yellow, style={'bold', 'underline'}})
|
highlite.highlight('Todo', {fg=yellow, style={'bold', 'underline'}})
|
||||||
-- Link a grou
|
-- Link a grou
|
||||||
paper-tonic.highlight('Identifier', 'Todo')
|
highlite.highlight('Identifier', 'Todo')
|
||||||
<
|
<
|
||||||
|
|
||||||
See also: ~
|
See also: ~
|
||||||
|group-names| Additional semantic highlighting groups.
|
|group-names| Additional semantic highlighting groups.
|
||||||
|
|
||||||
*paper-tonic:highlight_terminal()*
|
*highlite:highlight_terminal()*
|
||||||
*paper-tonic-highlight_terminal()*
|
*highlite-highlight_terminal()*
|
||||||
`paper-tonic`:highlight_terminal({terminal_ansi_colors})
|
`highlite`:highlight_terminal({terminal_ansi_colors})
|
||||||
|
|
||||||
Override the |terminal| colors with a new table of {terminal_ansi_colors}.
|
Override the |terminal| colors with a new table of {terminal_ansi_colors}.
|
||||||
|
|
||||||
|
@ -128,9 +128,9 @@ USAGE *paper-tonic-usa
|
||||||
|
|
||||||
Example: ~
|
Example: ~
|
||||||
>
|
>
|
||||||
local paper-tonic = require('paper-tonic')
|
local highlite = require('highlite')
|
||||||
|
|
||||||
paper-tonic:highlight_terminal({
|
highlite:highlight_terminal({
|
||||||
[1] = {'#202020' , 0 , 'black'},
|
[1] = {'#202020' , 0 , 'black'},
|
||||||
[2] = {'#a80000' , 124 , 'darkred'},
|
[2] = {'#a80000' , 124 , 'darkred'},
|
||||||
[3] = {'#50de60' , 83 , 'darkgreen'},
|
[3] = {'#50de60' , 83 , 'darkgreen'},
|
||||||
|
@ -154,7 +154,7 @@ USAGE *paper-tonic-usa
|
||||||
|terminal-configuration| Information about how the groups are set.
|
|terminal-configuration| Information about how the groups are set.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
FAQ *paper-tonic-faq*
|
FAQ *highlite-faq*
|
||||||
|
|
||||||
E5108: Error executing lua [string ":lua"]:1: module '<colorscheme>' not found ~
|
E5108: Error executing lua [string ":lua"]:1: module '<colorscheme>' not found ~
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ Override the highlighting of one specific highlight group in my init.vim? ~
|
||||||
When using this plugin, it is important to know that you cannot just run `:hi`
|
When using this plugin, it is important to know that you cannot just run `:hi`
|
||||||
on a highlight group and expect that its changes will be retained. You must
|
on a highlight group and expect that its changes will be retained. You must
|
||||||
attach them to the |ColorScheme| |autocmd-event|, as shown below: >
|
attach them to the |ColorScheme| |autocmd-event|, as shown below: >
|
||||||
packadd nvim-paper-tonic
|
packadd nvim-highlite
|
||||||
set termguicolors "optional
|
set termguicolors "optional
|
||||||
|
|
||||||
" WRONG! Don't do this.
|
" WRONG! Don't do this.
|
||||||
|
@ -173,11 +173,11 @@ attach them to the |ColorScheme| |autocmd-event|, as shown below: >
|
||||||
|
|
||||||
" Do this instead.
|
" Do this instead.
|
||||||
augroup Highlite
|
augroup Highlite
|
||||||
" You can also use `paper-tonic.highlight()` instead of `:hi!`
|
" You can also use `highlite.highlight()` instead of `:hi!`
|
||||||
autocmd ColorScheme paper-tonic hi! Error guifg=#000000 guibg=#FFFFFF
|
autocmd ColorScheme highlite hi! Error guifg=#000000 guibg=#FFFFFF
|
||||||
augroup end
|
augroup end
|
||||||
|
|
||||||
colorscheme paper-tonic
|
colorscheme highlite
|
||||||
<
|
<
|
||||||
|
|
||||||
Of course, substitute "highlight" with the name of your colorscheme.
|
Of course, substitute "highlight" with the name of your colorscheme.
|
12
doc/tags
12
doc/tags
|
@ -1,12 +0,0 @@
|
||||||
paper-tonic paper-tonic.txt /*paper-tonic*
|
|
||||||
paper-tonic-faq paper-tonic.txt /*paper-tonic-faq*
|
|
||||||
paper-tonic-group() paper-tonic.txt /*paper-tonic-group()*
|
|
||||||
paper-tonic-highlight() paper-tonic.txt /*paper-tonic-highlight()*
|
|
||||||
paper-tonic-highlight_terminal() paper-tonic.txt /*paper-tonic-highlight_terminal()*
|
|
||||||
paper-tonic-requirements paper-tonic.txt /*paper-tonic-requirements*
|
|
||||||
paper-tonic-toc paper-tonic.txt /*paper-tonic-toc*
|
|
||||||
paper-tonic-usage paper-tonic.txt /*paper-tonic-usage*
|
|
||||||
paper-tonic.group() paper-tonic.txt /*paper-tonic.group()*
|
|
||||||
paper-tonic.highlight() paper-tonic.txt /*paper-tonic.highlight()*
|
|
||||||
paper-tonic.txt paper-tonic.txt /*paper-tonic.txt*
|
|
||||||
paper-tonic:highlight_terminal() paper-tonic.txt /*paper-tonic:highlight_terminal()*
|
|
|
@ -7,9 +7,7 @@
|
||||||
--[[/* VARS */]]
|
--[[/* VARS */]]
|
||||||
|
|
||||||
--- Which set of colors to use.
|
--- Which set of colors to use.
|
||||||
local has_t_Co = pcall(function() return vim.go.t_Co end)
|
local _USE_256 = tonumber(vim.go.t_Co) > 255 or string.find(vim.env.TERM, '256')
|
||||||
local _USE_256 = (has_t_Co and tonumber(vim.go.t_Co) > 255) or string.find(vim.env.TERM, '256')
|
|
||||||
|
|
||||||
|
|
||||||
--- Indicating nothing for a highlight field.
|
--- Indicating nothing for a highlight field.
|
||||||
local _NONE = 'NONE'
|
local _NONE = 'NONE'
|
Loading…
Reference in New Issue