initial paper-tonic commit
This commit is contained in:
parent
b0c31d84d8
commit
cd13880d2c
48
README.md
48
README.md
|
@ -1,4 +1,4 @@
|
|||
# nvim-highlite
|
||||
# nvim-paper-tonic
|
||||
|
||||
## Default Settings Preview
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
|||
|
||||
## Introduction
|
||||
|
||||
`nvim-highlite` is a colorscheme template repository for Neovim 0.5+.
|
||||
`nvim-paper-tonic` is a colorscheme template repository for Neovim 0.5+.
|
||||
|
||||
This template's _defaults_ focus on:
|
||||
|
||||
|
@ -32,12 +32,12 @@ The only prerequisite is Neovim 0.5+
|
|||
|
||||
### Creating Your Own
|
||||
|
||||
1. Fork this repository, or clone it with `git clone https://github.com/Iron-E/nvim-highlite`.
|
||||
2. Follow the instructions in [`colors/highlite.vim`](colors/highlite.vim).
|
||||
1. Fork this repository, or clone it with `git clone https://github.com/Iron-E/nvim-paper-tonic`.
|
||||
2. Follow the instructions in [`colors/paper-tonic.vim`](colors/paper-tonic.vim).
|
||||
* If you are on a Unix system, use the [setup script](setup.sh) like so:
|
||||
```sh
|
||||
chmod +x ./setup.sh
|
||||
./setup.sh highlite <colorscheme>
|
||||
./setup.sh paper-tonic <colorscheme>
|
||||
```
|
||||
Where `<colorscheme>` is the name of your desired colorscheme.
|
||||
* 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)
|
||||
use {'wbthomason/packer.nvim', opt=true}
|
||||
use 'Iron-E/nvim-highlite'
|
||||
use 'Iron-E/nvim-paper-tonic'
|
||||
end}
|
||||
```
|
||||
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.
|
||||
set termguicolors
|
||||
" Use the colorscheme
|
||||
colorscheme highlite
|
||||
colorscheme paper-tonic
|
||||
```
|
||||
Or using `init.lua`:
|
||||
```lua
|
||||
vim.opt.termguicolors = true
|
||||
vim.api.nvim_command 'colorscheme highlite'
|
||||
vim.api.nvim_command 'colorscheme paper-tonic'
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
This repository in itself is an example of how to use `nvim-highlite`. Aside from this, the following colorschemes are built using `nvim-highlite`:
|
||||
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`:
|
||||
|
||||
* (if you use this, open an issue and I'll add it here!)
|
||||
|
||||
### As Dependency
|
||||
|
||||
Below is an example of how to use `nvim-highlite` as a dependency.
|
||||
Below is an example of how to use `nvim-paper-tonic` as a dependency.
|
||||
|
||||
* See `:h highlite-usage` for more.
|
||||
* See `:h paper-tonic-usage` for more.
|
||||
|
||||
```lua
|
||||
-- Import nvim-highlite
|
||||
local highlite = require('highlite')
|
||||
-- Import nvim-paper-tonic
|
||||
local paper-tonic = require('paper-tonic')
|
||||
|
||||
-- First, define some colors
|
||||
local red = {'#FF0000', 1, 'red'}
|
||||
|
@ -100,23 +100,23 @@ local black = {'#000000', 0, 'black'}
|
|||
local white = {'#FFFFFF', 255, 'white'}
|
||||
|
||||
-- Highlight 'Identifier'
|
||||
highlite.highlight('Identifier', {bg=red, fg=black, style='bold'})
|
||||
paper-tonic.highlight('Identifier', {bg=red, fg=black, style='bold'})
|
||||
|
||||
-- Highlight 'Function' conditionally according to background color.
|
||||
highlite.highlight('Function', {bg=black, fg=red, light={bg=white}})
|
||||
paper-tonic.highlight('Function', {bg=black, fg=red, light={bg=white}})
|
||||
|
||||
-- Link 'Example' to 'Identifier'
|
||||
highlite.highlight('Example', 'Identifier')
|
||||
paper-tonic.highlight('Example', 'Identifier')
|
||||
|
||||
-- You can also reference specific attributes of another highlight group.
|
||||
highlite.highlight('AnotherExample', {bg=highlite.group'SpellBad'.bg, fg=white})
|
||||
paper-tonic.highlight('AnotherExample', {bg=paper-tonic.group'SpellBad'.bg, fg=white})
|
||||
```
|
||||
|
||||
### As Template
|
||||
|
||||
Below is an example of how to use `nvim-highlite` as a template.
|
||||
Below is an example of how to use `nvim-paper-tonic` as a template.
|
||||
|
||||
* See [`highlite.vim`](colors/highlite.vim) for more.
|
||||
* See [`paper-tonic.vim`](colors/paper-tonic.vim) for more.
|
||||
|
||||
```lua
|
||||
-- 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:
|
||||
|
||||
```vim
|
||||
packadd nvim-highlite
|
||||
packadd nvim-paper-tonic
|
||||
set termguicolors "optional
|
||||
|
||||
" WRONG! Don't do this.
|
||||
|
@ -154,14 +154,14 @@ hi! Error guifg=#000000 guibg=#FFFFFF
|
|||
|
||||
" Do this instead.
|
||||
augroup Highlite
|
||||
" You can also use `highlite.highlight()` instead of `:hi!`
|
||||
autocmd ColorScheme highlite hi! Error guifg=#000000 guibg=#FFFFFF
|
||||
" You can also use `paper-tonic.highlight()` instead of `:hi!`
|
||||
autocmd ColorScheme paper-tonic hi! Error guifg=#000000 guibg=#FFFFFF
|
||||
augroup end
|
||||
|
||||
colorscheme highlite
|
||||
colorscheme paper-tonic
|
||||
```
|
||||
|
||||
Of course, substitute `highlite` with the name of your colorscheme.
|
||||
Of course, substitute `paper-tonic` with the name of your colorscheme.
|
||||
|
||||
> Why am I receiving `E5108: Error executing lua [string ":lua"]:1: module '<colorscheme>' not found`?
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
--[[ Highlite, a Neovim colorscheme template.
|
||||
* Author: Iron-E (https://github.com/Iron-E)
|
||||
* Repository: https://github.com/nvim-highlite
|
||||
* Repository: https://github.com/nvim-paper-tonic
|
||||
|
||||
Initially forked from vim-rnb, a Vim colorsheme template:
|
||||
* Author: Romain Lafourcade (https://github.com/romainl)
|
||||
|
@ -39,10 +39,10 @@
|
|||
| foo_bar | foo_bar | foo_bar.lua |
|
||||
|
||||
Rename the following files:
|
||||
* `colors/highlite.vim`
|
||||
* `lua/highlite.lua`
|
||||
* `colors/paper-tonic.vim`
|
||||
* `lua/paper-tonic.lua`
|
||||
|
||||
Where 'highlite' is the name of your colorscheme.
|
||||
Where 'paper-tonic' is the name of your colorscheme.
|
||||
|
||||
TIP: If you are on a Unix-based system (or have WSL on Windows) you can use the setup script at the root of this repo.
|
||||
See the README for more details.
|
||||
|
@ -57,7 +57,7 @@
|
|||
]]
|
||||
|
||||
-- This is the name of your colorscheme which will be used as per |g:colors_name|.
|
||||
vim.g.colors_name = 'highlite'
|
||||
vim.g.colors_name = 'paper-tonic'
|
||||
|
||||
--[[ Step 3: Colors
|
||||
Next you will define all of the colors that you will use for the color scheme.
|
||||
|
@ -213,7 +213,7 @@ local purple_light = {'#af60af', 63, 'magenta'}
|
|||
end
|
||||
```
|
||||
|
||||
The function will be executed by |highlite| and transformed into the
|
||||
The function will be executed by |paper-tonic| and transformed into the
|
||||
expected result.
|
||||
____________________________________________________________________________
|
||||
|
||||
|
@ -965,7 +965,7 @@ local terminal_colors = {
|
|||
--[[ Step 5: Sourcing
|
||||
When you wish to load your colorscheme, simply add this folder with a plugin manager
|
||||
and then use `colorscheme <your colorscheme name>`. For example, in my configuration,
|
||||
I source highlite by using `colorscheme highlite`.
|
||||
I source paper-tonic by using `colorscheme paper-tonic`.
|
||||
|
||||
These online resources can help you design your colorscheme:
|
||||
|
|
@ -1,58 +1,58 @@
|
|||
*highlite.txt* Plugin for maintaining colorschemes
|
||||
*highlite*
|
||||
*paper-tonic.txt* Plugin for maintaining colorschemes
|
||||
*paper-tonic*
|
||||
|
||||
Author: Iron-E – https://github.com/Iron-E & https://gitlab.com/Iron_E
|
||||
Web: https://github.com/Iron-E/nvim-highlite
|
||||
Web: https://github.com/Iron-E/nvim-paper-tonic
|
||||
|
||||
|highlite| is a plugin for creating and maintaining colorschemes. It can
|
||||
|paper-tonic| is a plugin for creating and maintaining colorschemes. It can
|
||||
be configured by cloning the repository and following the README, or
|
||||
individually used to comprehensively highlight groups with its functions.
|
||||
|
||||
==============================================================================
|
||||
TABLE OF CONTENTS *highlite-toc*
|
||||
TABLE OF CONTENTS *paper-tonic-toc*
|
||||
|
||||
1. Requirements ............ |highlite-requirements|
|
||||
2. Usage ................... |highlite-usage|
|
||||
3. FAQ ..................... |highlite-faq|
|
||||
1. Requirements ............ |paper-tonic-requirements|
|
||||
2. Usage ................... |paper-tonic-usage|
|
||||
3. FAQ ..................... |paper-tonic-faq|
|
||||
|
||||
==============================================================================
|
||||
REQUIREMENTS *highlite-requirements*
|
||||
REQUIREMENTS *paper-tonic-requirements*
|
||||
|
||||
- Neovim 0.5+
|
||||
|
||||
==============================================================================
|
||||
USAGE *highlite-usage*
|
||||
USAGE *paper-tonic-usage*
|
||||
|
||||
*highlite.group()*
|
||||
`highlite`.group({group_name}) *highlite-group()*
|
||||
*paper-tonic.group()*
|
||||
`paper-tonic`.group({group_name}) *paper-tonic-group()*
|
||||
|
||||
Convert a pre-existing |highlight-group| into a format that |highlite|
|
||||
Convert a pre-existing |highlight-group| into a format that |paper-tonic|
|
||||
recognizes.
|
||||
|
||||
Note: the |highlight-group| must have been either:
|
||||
- |:highlight|ed.
|
||||
- |highlite-highlight|ed.
|
||||
- |paper-tonic-highlight|ed.
|
||||
|
||||
Parameters: ~
|
||||
{group_name} A `string` which is the |highlight-group| to convert.
|
||||
|
||||
Return: ~
|
||||
- A `table` which can be used as the {attributes} parameter for
|
||||
|highlite.highlight()|.
|
||||
|paper-tonic.highlight()|.
|
||||
|
||||
Example: ~
|
||||
>
|
||||
local highlite = require('highlite')
|
||||
local paper-tonic = require('paper-tonic')
|
||||
|
||||
-- get the 'Error' highlight group
|
||||
local hl_error = highlite.group('Error')
|
||||
local hl_error = paper-tonic.group('Error')
|
||||
|
||||
-- Define 'ErrorMsg' as foreground = background of 'Error'
|
||||
highlite.highlight('ErrorMsg', {fg=hl_error.bg, bg=BG})
|
||||
paper-tonic.highlight('ErrorMsg', {fg=hl_error.bg, bg=BG})
|
||||
<
|
||||
|
||||
*highlite.highlight()*
|
||||
`highlite`.highlight({group}, {attributes}) *highlite-highlight()*
|
||||
*paper-tonic.highlight()*
|
||||
`paper-tonic`.highlight({group}, {attributes}) *paper-tonic-highlight()*
|
||||
|
||||
Highlight some {group} according to its {attributes}.
|
||||
|
||||
|
@ -81,22 +81,22 @@ USAGE *highlite-usage*
|
|||
|
||||
Example: ~
|
||||
>
|
||||
local highlite = require('highlite')
|
||||
local paper-tonic = require('paper-tonic')
|
||||
|
||||
local yellow = {'#f0df33', 220, 'yellow'}
|
||||
|
||||
-- Highlight a new group
|
||||
highlite.highlight('Todo', {fg=yellow, style={'bold', 'underline'}})
|
||||
paper-tonic.highlight('Todo', {fg=yellow, style={'bold', 'underline'}})
|
||||
-- Link a grou
|
||||
highlite.highlight('Identifier', 'Todo')
|
||||
paper-tonic.highlight('Identifier', 'Todo')
|
||||
<
|
||||
|
||||
See also: ~
|
||||
|group-names| Additional semantic highlighting groups.
|
||||
|
||||
*highlite:highlight_terminal()*
|
||||
*highlite-highlight_terminal()*
|
||||
`highlite`:highlight_terminal({terminal_ansi_colors})
|
||||
*paper-tonic:highlight_terminal()*
|
||||
*paper-tonic-highlight_terminal()*
|
||||
`paper-tonic`:highlight_terminal({terminal_ansi_colors})
|
||||
|
||||
Override the |terminal| colors with a new table of {terminal_ansi_colors}.
|
||||
|
||||
|
@ -128,9 +128,9 @@ USAGE *highlite-usage*
|
|||
|
||||
Example: ~
|
||||
>
|
||||
local highlite = require('highlite')
|
||||
local paper-tonic = require('paper-tonic')
|
||||
|
||||
highlite:highlight_terminal({
|
||||
paper-tonic:highlight_terminal({
|
||||
[1] = {'#202020' , 0 , 'black'},
|
||||
[2] = {'#a80000' , 124 , 'darkred'},
|
||||
[3] = {'#50de60' , 83 , 'darkgreen'},
|
||||
|
@ -154,7 +154,7 @@ USAGE *highlite-usage*
|
|||
|terminal-configuration| Information about how the groups are set.
|
||||
|
||||
==============================================================================
|
||||
FAQ *highlite-faq*
|
||||
FAQ *paper-tonic-faq*
|
||||
|
||||
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`
|
||||
on a highlight group and expect that its changes will be retained. You must
|
||||
attach them to the |ColorScheme| |autocmd-event|, as shown below: >
|
||||
packadd nvim-highlite
|
||||
packadd nvim-paper-tonic
|
||||
set termguicolors "optional
|
||||
|
||||
" WRONG! Don't do this.
|
||||
|
@ -173,11 +173,11 @@ attach them to the |ColorScheme| |autocmd-event|, as shown below: >
|
|||
|
||||
" Do this instead.
|
||||
augroup Highlite
|
||||
" You can also use `highlite.highlight()` instead of `:hi!`
|
||||
autocmd ColorScheme highlite hi! Error guifg=#000000 guibg=#FFFFFF
|
||||
" You can also use `paper-tonic.highlight()` instead of `:hi!`
|
||||
autocmd ColorScheme paper-tonic hi! Error guifg=#000000 guibg=#FFFFFF
|
||||
augroup end
|
||||
|
||||
colorscheme highlite
|
||||
colorscheme paper-tonic
|
||||
<
|
||||
|
||||
Of course, substitute "highlight" with the name of your colorscheme.
|
|
@ -0,0 +1,12 @@
|
|||
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()*
|
Loading…
Reference in New Issue