Add FileType information to the README (#10)

* Add FileType information to the README
* Add ColorizerAttachToBuffer command
This commit is contained in:
Filipe Kiss 2019-10-18 15:53:49 +02:00 committed by Ashkan Kiani
parent cfb6bfa4a1
commit a3dba907bd
2 changed files with 8 additions and 0 deletions

View file

@ -80,6 +80,13 @@ require 'colorizer'.setup {
For lower level interface, see the [LuaDocs for API details](https://norcalli.github.io/luadoc/nvim-colorizer.lua/modules/colorizer.html) or use `:h colorizer.lua` once installed.
## Caveats
If the file you are editing has no filetype, the plugin won't be attached, as it relies on AutoCmd to do so. You can still make it work by running the following command:
`:ColorizerAttachToBuffer`
See [this comment](https://github.com/norcalli/nvim-colorizer.lua/issues/9#issuecomment-543742619) for more information.
## TODO
- [ ] Add more display modes?

View file

@ -3,5 +3,6 @@ if exists('g:loaded_colorizer')
endif
command! ReloadBufferColorizer lua require'colorizer'.reload_buffer()
command! ColorizerAttachToBuffer lua require'colorizer'.attach_to_buffer(0)
let g:loaded_colorizer = 1