docs(README): add Lua instructions

This commit is contained in:
Iron-E 2021-08-05 17:38:09 -04:00
parent c57f75ec4f
commit 2945b3a54a
No known key found for this signature in database
GPG Key ID: 19B71B7B7B021D22
1 changed files with 33 additions and 17 deletions

View File

@ -1,8 +1,10 @@
# Default Settings Preview # nvim-highlite
## Default Settings Preview
![lua preview](https://user-images.githubusercontent.com/36409591/128422684-f51354e9-e895-493e-8e7d-db7bb08eb735.png "Lua Preview") ![lua preview](https://user-images.githubusercontent.com/36409591/128422684-f51354e9-e895-493e-8e7d-db7bb08eb735.png "Lua Preview")
# Introduction ## Introduction
`nvim-highlite` is a colorscheme template repository for Neovim 0.5+. `nvim-highlite` is a colorscheme template repository for Neovim 0.5+.
@ -24,13 +26,11 @@ This template's _design_ focuses on:
* Changes made to the highlighting algorithm won't affect how you write your colorscheme. * Changes made to the highlighting algorithm won't affect how you write your colorscheme.
* New highlight group attributes which are unaccounted for in older versions will simply be ignored without errors due to Lua's `table`s. * New highlight group attributes which are unaccounted for in older versions will simply be ignored without errors due to Lua's `table`s.
# Prerequisites ## Installation
1. Neovim 0.5+ The only prerequisite is Neovim 0.5+
# Installation ### Creating Your Own
## Creating Your Own
1. Fork this repository, or clone it with `git clone https://github.com/Iron-E/nvim-highlite`. 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). 2. Follow the instructions in [`colors/highlite.vim`](colors/highlite.vim).
@ -44,25 +44,41 @@ This template's _design_ focuses on:
Whenever you want to update from then on, you can run the [update script](update.sh). This will load the latest upstream changes to the core highlighting library. Whenever you want to update from then on, you can run the [update script](update.sh). This will load the latest upstream changes to the core highlighting library.
## Just The Defaults ### Just The Defaults
1. Install a plugin manager such as [`vim-plug`](https://github.com/junegunn/vim-plug) and use it to "plug" this repository. 1. Install a plugin manager such as [`packer.nvim`](https://github.com/wbthomason/packer.nvim):
```viml ```lua
" vim-plug example -- packer.nvim example
Plug "Iron-E/nvim-highlite" local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim'
if not vim.loop.fs_stat(fn.glob(install_path)) then
os.execute('git clone https://github.com/wbthomason/packer.nvim '..install_path)
end
vim.api.nvim_command 'packadd packer.nvim'
return require('packer').startup {function(use)
use {'wbthomason/packer.nvim', opt=true}
use 'Iron-E/nvim-highlite'
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`:
```viml ```vim
" Enable 24-bit color output. Only do this IF your environment supports it. " Enable 24-bit color output. Only do this IF your environment supports it.
" 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 highlite colorscheme highlite
``` ```
Or using `init.lua`:
```lua
vim.opt.termguicolors = true -- Set color mode
vim.api.nvim_command 'colorscheme highlite'
```
# Usage ## Usage
## Examples
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-highlite`. Aside from this, the following colorschemes are built using `nvim-highlite`:
@ -202,7 +218,7 @@ You can either use [`nvim-treesitter`](https://github.com/nvim-treesitter/nvim-t
| YAML | [stephpy/vim-yaml](https://github.com/stephpy/vim-yaml) | | YAML | [stephpy/vim-yaml](https://github.com/stephpy/vim-yaml) |
| YATS | [HerringtonDarkholme/yats](https://github.com/HerringtonDarkholme/yats) | | YATS | [HerringtonDarkholme/yats](https://github.com/HerringtonDarkholme/yats) |
# Contribution ## Contribution
This repository is looking for contributions! The following things are appreciated: This repository is looking for contributions! The following things are appreciated: