E5108: attempt to index global '_WEBTOOLS_CFG' (a nil value)
tardiobscurus opened this issue · comments
Have followed the installation: installing browser-sync. adding the lsp option.
Below is the following error that popped up when launching NVIM:
E5108: Error executing lua .../autoload/plugged/web-tools.nvim/lua/web-tools/utils.lua:31: attempt to index global '_WEBTOOLS_CFG' (a nil value)
stack traceback:
.../autoload/plugged/web-tools.nvim/lua/web-tools/utils.lua:31: in function 'log'
.../autoload/plugged/web-tools.nvim/lua/web-tools/utils.lua:35: in main chunk
[C]: in function 'require'
...m/autoload/plugged/web-tools.nvim/lua/web-tools/init.lua:1: in main chunk
[C]: in function 'require'
[string ":lua"]:9: in main chunk
It was the chunk of code mentioned in the installation README. Which was:
require'web-tools'.setup({
keymaps = {
rename = '', -- by default use same setup of lspconfig
repeat_rename = '.', -- . to repeat
},
})
Though I'm not sure if this is the best use of the configuration, or optional.
!! post note:
In the doc/web-tools.txt
I've found this chunk on the setup:
require'liveview'.setup({
keymaps = {
rename = '', -- by default use same setup of lspconfig
repeat_rename = '.', -- . to repeat
},
})
Though, the error stated that it didn't find the liveview
module;
E5108: Error executing lua [string ":lua"]:10: module 'liveview' not found:
no field package.preload['liveview']
no file './liveview.lua'
no file '/home/runner/work/neovim/neovim/.deps/usr/share/luajit-2.1.0-beta3/liveview.lua'
no file '/usr/local/share/lua/5.1/liveview.lua'
no file '/usr/local/share/lua/5.1/liveview/init.lua'
no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/liveview.lua'
no file '/home/runner/work/neovim/neovim/.deps/usr/share/lua/5.1/liveview/init.lua'
no file './liveview.so'
no file '/usr/local/lib/lua/5.1/liveview.so'
no file '/home/runner/work/neovim/neovim/.deps/usr/lib/lua/5.1/liveview.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
[string ":lua"]:10: in main chunk
Again, I don't know if the setup is optional.
You can setup the plugin by:
require'web-tools'.setup()
If you do not plan to change the keymaps
Also, I update the code it should be fixed.
It did work! yet, it doesn't pop-up automatically. though I don't know if it is intended to not do so. though it does load automatically when I am in localhost:(port)
manually.
it might be me by using to vscode extensions.
overall, it worked and no errors occurred!