Commit graph

17 commits

Author SHA1 Message Date
Kye Shi a065833f35 Fix parsing for RRGGBBAA hex codes 2024-05-10 12:01:27 +08:00
Ashkan Kiani 35f1aad99c Merge branch 'master' of github.com:norcalli/nvim-colorizer.lua 2019-11-07 20:16:53 -08:00
James Reed ee1a2f0a74 Add function to check if attached to a buffer 2019-11-07 20:16:37 -08:00
Ashkan Kiani 8f98c7bb0c Disable strict index checking. 2019-11-07 20:14:32 -08:00
Ashkan Kiani 3e19acc414
Move dependencies to their own directory. (#21) 2019-10-22 21:27:01 -07:00
Ashkan Kiani f5017b0dc1
Refactor (#19)
- Refactor and clean up old code.
- Fix the trie printing (it's perfect now :o)
- Add the ability to search from a starting point. This can help
avoid allocations.
- Avoid an allocation in longest_prefix.
- Refactor and allow configuring of color_name_parser setup
2019-10-19 12:35:55 -07:00
Ashkan Kiani 9333430ba8 Update trie
- Refactor and clean up old code.
- Fix the trie printing (it's perfect now :o)
- Add the ability to search from a starting point. This can help
avoid allocations.
- Avoid an allocation in longest_prefix.
2019-10-19 10:38:09 -07:00
Ashkan Kiani 83ddc656b3
Improve algorithm performance and correctness. (#15)
- Disable highlighting for HEX codes and NAME codes when
preceded by alphanumeric codes.
- Hand written parser with 1 pass parsing.
- Update Trie to be more ergonomic.
- Add test file with expected outputs for edge cases.
- Cache matcher creation and refactor.
- Refactor

Faster than ever baby
2019-10-18 21:51:56 -07:00
Ashkan Kiani 6c3d4e4b4c
Update color functions (#13)
- Add hsl, hsla, rgba, RRGGBBAA
- Redo the parser for rgb,rgba,hsl,hsla codes.
- Fix the trie implementation.
- Bugfix and refactor alpha/error handling
2019-10-18 14:27:02 -07:00
Ashkan Kiani f661199197
Allow excluding files from highlight with '*' (#11)
Fixes GH-5
2019-10-18 09:56:49 -07:00
Ashkan Kiani 615e32c94f Update docs and luadocs 2019-10-18 09:43:18 -07:00
Ashkan Kiani 962453e7b7 Update with fully qualified settings and commands.
- Add command documentation and new commands.
- Add new settings which have a better naming scheme.
- Fix reloading settings and add a command to detach highlighter.
- Fix #RGB pattern like for #define where it will highlight the #def
part.
2019-10-18 09:25:25 -07:00
Ashkan Kiani 7fefb96644 Refactor and cleanup. 2019-10-17 19:31:17 -07:00
Ashkan Kiani 7bb80eb499 Critical bugfix! 2019-10-17 19:17:09 -07:00
Ashkan Kiani 90ab6b7a65 Add reload and bugfix highlight name.
Add ReloadBufferColorizer
Add nvim.lua
Fix highlight_buffer names for highlight_cache
2019-10-17 17:14:56 -07:00
Ashkan Kiani 94197db4be Add readme, docs, rgb(), #RGB, and options
- Add support for `rgb(...)` functions behind an option gate.
- Highlight #RGB codes.
- Add options, like `rgb_fn` and `no_names`
- Add luadoc.
2019-10-17 16:26:20 -07:00
Ashkan Kiani f0c8b75cc4 Initial commit. 2019-10-17 15:15:32 -07:00