norcalli / nvim-colorizer.lua

The fastest Neovim colorizer.
Other
2.25k stars 117 forks source link

Add FileType information to the README #10

Closed filipekiss closed 4 years ago

filipekiss commented 4 years ago

Closes #9

norcalli commented 4 years ago

Lovely! Thank you. Ha, yeah I didn't publicize the :ReloadBufferColorizer command since it has some edge cases with respecting the options from setup() command because I wanted to avoid global state, but for this purpose, it definitely works well.

norcalli commented 4 years ago

Oh, also :ReloadBufferColorizer doesn't attach_to_buffer and continue highlighting, which is another reason why I didn't publicize it. It was for reloading if you changed the settings, but, as I mentioned, that had some edge cases. Maybe I'll add a ColorizerAttachToBuffer command and rename ReloadBufferColorizer to ColorizerReloadBufferOptions.

filipekiss commented 4 years ago

I've added the ColorizerAttachToBuffer command as you mentioned on #9. Is the hardcoded 0 ok for this? I'm not sure how the Lua API works regarding buffer numbers :P

norcalli commented 4 years ago

Even better! 0 indicates the current buffer in the Lua neovim apis (also for window commands it indicates the current window).

norcalli commented 4 years ago

The only thing is that it won't respect the default options if you have used setup() but that's more of a bug and something I'll fix.

filipekiss commented 4 years ago

Glad I could help :D Thank you again for the plugin!