aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe Kiss <hello@filipekiss.com.br>2019-10-18 15:53:49 +0200
committerAshkan Kiani <ashkan.k.kiani@gmail.com>2019-10-18 06:53:48 -0700
commita3dba907bd74d1f98d544fb5c1bca0309ed43e81 (patch)
treee8930008173c492d81f5608247b5a705c1c9c5c0
parentMerge branch 'master' of github.com:norcalli/nvim-colorizer.lua (diff)
Add FileType information to the README (#10)
* Add FileType information to the README * Add ColorizerAttachToBuffer command
-rw-r--r--README.md7
-rw-r--r--plugin/colorizer.vim1
2 files changed, 8 insertions, 0 deletions
diff --git a/README.md b/README.md
index 3304195..e7626d9 100644
--- a/README.md
+++ b/README.md
@@ -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?
diff --git a/plugin/colorizer.vim b/plugin/colorizer.vim
index 1650877..52b95b4 100644
--- a/plugin/colorizer.vim
+++ b/plugin/colorizer.vim
@@ -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