Skip to content

Commit a3dba90

Browse files
filipekissAshkan Kiani
authored andcommitted
Add FileType information to the README (#10)
* Add FileType information to the README * Add ColorizerAttachToBuffer command
1 parent cfb6bfa commit a3dba90

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ require 'colorizer'.setup {
8080

8181
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.
8282

83+
## Caveats
84+
85+
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:
86+
`:ColorizerAttachToBuffer`
87+
88+
See [this comment](https://github.com/norcalli/nvim-colorizer.lua/issues/9#issuecomment-543742619) for more information.
89+
8390
## TODO
8491

8592
- [ ] Add more display modes?

plugin/colorizer.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ if exists('g:loaded_colorizer')
33
endif
44

55
command! ReloadBufferColorizer lua require'colorizer'.reload_buffer()
6+
command! ColorizerAttachToBuffer lua require'colorizer'.attach_to_buffer(0)
67

78
let g:loaded_colorizer = 1

0 commit comments

Comments
 (0)