aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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