mirror of
https://github.com/norcalli/nvim-colorizer.lua.git
synced 2026-09-10 07:06:14 -04:00
Adds minimal repro script (#98)
* chore: creates minimal.lua to reproduce issues * doc: adds testing section to readme
This commit is contained in:
parent
f6bba01ddd
commit
e0b789cc8d
14
README.md
14
README.md
|
|
@ -9,8 +9,10 @@
|
|||
- [Why another highlighter?](#why-another-highlighter)
|
||||
- [Customization](#customization)
|
||||
- [Updating color even when buffer is not focused](#updating-color-even-when-buffer-is-not-focused)
|
||||
- [Testing](#testing)
|
||||
- [Extras](#extras)
|
||||
- [TODO](#todo)
|
||||
- [Similar projects](#similar-projects)
|
||||
<!--toc:end-->
|
||||
|
||||
[](https://nvchad.com/nvim-colorizer.lua/)
|
||||
|
|
@ -268,6 +270,18 @@ For lower level interface, see
|
|||
[LuaDocs for API details](https://nvchad.com/nvim-colorizer.lua/modules/colorizer.html)
|
||||
or use `:h colorizer` once installed.
|
||||
|
||||
## Testing
|
||||
|
||||
To test colorization with your config, edit `test/expect.txt` to see expected
|
||||
highlights
|
||||
|
||||
For troubleshooting use `test/minimal.lua`. Edit the file to configure colorizer.
|
||||
Run `minimal.lua` to startup neovim:
|
||||
|
||||
```bash
|
||||
nvim --clean -u minimal.lua expect.txt
|
||||
```
|
||||
|
||||
## Extras
|
||||
|
||||
Documentaion is generated using ldoc. See
|
||||
|
|
|
|||
1
test/.gitignore
vendored
Normal file
1
test/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
colorizer_issue/
|
||||
38
test/minimal.lua
Normal file
38
test/minimal.lua
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
-- Run this file as `nvim --clean -u minimal.lua expect.txt`
|
||||
|
||||
for name, url in pairs({
|
||||
colorizer = "https://github.com/NvChad/nvim-colorizer.lua",
|
||||
}) do
|
||||
local install_path = vim.fn.fnamemodify("colorizer_issue/" .. name, ":p")
|
||||
if vim.fn.isdirectory(install_path) == 0 then
|
||||
vim.fn.system({ "git", "clone", "--depth=1", url, install_path })
|
||||
end
|
||||
vim.opt.runtimepath:append(install_path)
|
||||
end
|
||||
|
||||
-- Configure setup opts
|
||||
local opts = {
|
||||
user_default_options = {
|
||||
RGB = true,
|
||||
RRGGBB = true,
|
||||
names = true,
|
||||
RRGGBBAA = true,
|
||||
AARRGGBB = true,
|
||||
rgb_fn = true,
|
||||
hsl_fn = true,
|
||||
css = true,
|
||||
css_fn = true,
|
||||
mode = "background",
|
||||
tailwind = "lsp",
|
||||
sass = {
|
||||
enable = false,
|
||||
parsers = { "css" },
|
||||
},
|
||||
virtualtext = "■",
|
||||
},
|
||||
buftypes = { "!prompt", "!popup" },
|
||||
user_commands = true,
|
||||
}
|
||||
require("colorizer").setup(opts)
|
||||
|
||||
-- ADD INIT.LUA SETTINGS _NECESSARY_ FOR REPRODUCING THE ISSUE
|
||||
Loading…
Reference in a new issue