Compare commits

..

18 Commits

Author SHA1 Message Date
Ray Elliott c7f1772d65 update 2024-05-20 12:02:36 +01:00
Ray Elliott 54641988db fix no t_Co option error 2024-05-20 12:02:25 +01:00
Ray Elliott 8cdef01d65 update 2022-03-21 12:09:44 +00:00
Ray Elliott c0546d77bd update.sh 2022-03-13 19:41:41 +00:00
Ray Elliott ff8abed01e update 2022-01-24 10:07:24 +00:00
Ray Elliott 42ae2fd244 update 2022-01-24 09:42:33 +00:00
Ray Elliott ddc39fb89c update 2022-01-23 11:04:22 +00:00
Ray Elliott 1bb889e688 style floating windows 2022-01-22 21:25:36 +00:00
Ray Elliott ad2242c48c fix diagnostics 2022-01-22 19:55:43 +00:00
Ray Elliott 0209283a8f update 2022-01-22 18:38:44 +00:00
Ray Elliott 17e8a2cdaf update 2021-09-22 09:52:33 +01:00
Ray Elliott 9cf8c5df17 update 2021-09-07 22:24:06 +01:00
Ray Elliott f25afbef0f fix tabline 2021-09-07 13:45:05 +01:00
Ray Elliott 7d91db681c fix line colors 2021-09-07 13:05:38 +01:00
Ray Elliott b03c0dd83c update names 2021-09-07 12:24:46 +01:00
Ray Elliott 0006161c82 define colors 2021-09-07 12:18:46 +01:00
Ray Elliott 51a4eee4b3 wip - add color definitions/links 2021-09-06 15:33:01 +01:00
Ray Elliott cd13880d2c initial paper-tonic commit 2021-09-06 12:58:30 +01:00
6 changed files with 1195 additions and 1089 deletions

View File

@ -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`?

File diff suppressed because it is too large Load Diff

1123
colors/paper-tonic.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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.

12
doc/tags Normal file
View File

@ -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()*

View File

@ -7,7 +7,9 @@
--[[/* VARS */]]
--- Which set of colors to use.
local _USE_256 = tonumber(vim.go.t_Co) > 255 or string.find(vim.env.TERM, '256')
local has_t_Co = pcall(function() return vim.go.t_Co end)
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.
local _NONE = 'NONE'