Closed hkdd closed 2 years ago
Same with mplstyle
. Also doesn't work at all without g:colorizer_auto_filetype
(g:colorizer_auto_color
doesn't work).
NVIM v0.5.0-885-gba13b94f5
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/johnm/.cache/yay/neovim-git/src/build/config -I/home/johnm/.cache/yay/neovim-git/src/neovim-git/src -I/usr/include -I/home/johnm/.cache/yay/neovim-git/src/build/src/nvim/auto -I/home/johnm/.cache/yay/neovim-git/src/build/include
Compiled by johnm@john-venue11pro7140
thanks, I'll have a closer look over the holidays.
Hm, I just checked and I cannot reproduce. Setting g:colorizer_auto_filetype
will setup a filetype autocommand as can be seen here:
Can you check if this is there for you? Please show the output of :au FT_Colorizer_Plugin FileType
and also :au FTColorizer
Same with
mplstyle
. Also doesn't work at all withoutg:colorizer_auto_filetype
(g:colorizer_auto_color
doesn't work).NVIM v0.5.0-885-gba13b94f5 Build type: RelWithDebInfo LuaJIT 2.0.5 Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/johnm/.cache/yay/neovim-git/src/build/config -I/home/johnm/.cache/yay/neovim-git/src/neovim-git/src -I/usr/include -I/home/johnm/.cache/yay/neovim-git/src/build/src/nvim/auto -I/home/johnm/.cache/yay/neovim-git/src/build/include Compiled by johnm@john-venue11pro7140
Oh it's me being stupid and the reason is Vim not knowing mplstyle
filetype
C files work for me, but when current filetype is not in g:colorizer_auto_filetype
color only appears after I change something
can you give an example please?
g:colorizer_auto_color
example
" .vimrc or init.vim
let g:colorizer_auto_color=1
g:colorizer_auto_filetype
example
" .vimrc or init.vim
let g:colorizer_auto_filetype='c'
File used in both examples:
# /tmp/col-test.py
awesome_color = "#c0ffee"
Now start vim and type the following:
:e /tmp/col-test.py
:%s/awesome/my_awesome/
In a somewhat related note, it doesn't work for the qf
(quickfixlist
) type either?
With these settings:
let g:colorizer_auto_color = 1
let g:colorizer_auto_filetype = 'qf'
let g:colorizer_disable_bufleave = 1
It starts colorizing only after I run :ColorHighlight
manually in the qflist
, by switching to another window it turns off (expected) and it turns back on when returning. But nothing unless I run it manually first.
Does that part of the documentation help here please? https://github.com/chrisbra/Colorizer/commit/e592848da3f58f426aed89aa525d46886f071085
VIM 8.2.1551
I've tried both:
let g:colorizer_auto_filetype='css,html,c' let g:colorizer_auto_color = 1
And when opening .c files it doesn't automatically color, but :ColorToggle does toggle it correctly. HTML files automatically color on opening.