norcalli / nvim-colorizer.lua

The fastest Neovim colorizer.
Other
2.23k stars 117 forks source link

error #60

Closed d7eeem closed 3 years ago

d7eeem commented 3 years ago

i really tried to make it work before submitting

i am using lunarVim i added the module to my packer list and i created a folder with colorizer and i put in inside it init.lua with a line

require('colorizer').setup()

and it's not working and also it gives me a big red warning

E5113: Error while calling lua chunk: /home/d7eeem/.config/nvim/init.lua:23: module 'colorizer' not found:
        no field package.preload['colorizer']
        no file './colorizer.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/colorizer.lua'
        no file '/usr/local/share/lua/5.1/colorizer.lua'
        no file '/usr/local/share/lua/5.1/colorizer/init.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/colorizer.lua'
        no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/colorizer/init.lua'
        no file './colorizer.so'
        no file '/usr/local/lib/lua/5.1/colorizer.so'
        no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/colorizer.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
Press ENTER or type command to continue
Tinku10 commented 3 years ago

Can you try adding the below command on top.

vim.cmd [[ packadd nvim-colorizer.lua ]]

For me colorizer was working without having to explicitly mention it, but now I also have this issue. This command will fix it for you too I guess. But I would like to know why this issue originates from from where.

My guess it adding the .lua to the extension name is causing this issue but not sure though. @norcalli can you shed some light on this issue?

rebuilt commented 3 years ago

https://github.com/ChristianChiarulli/LunarVim#an-example-installation-of-the-colorizer-plugin