Hi, im quite new to the whole vim experience I came across your plugin and it looks awesome however im having some trouble trying to install it correctly I keep getting the following error:
,
_create_uv_options = ,
_execute = ,
_pipes_are_closed = ,
_prepare_pipes = ,
_reset = ,
_shutdown = ,
_stop = ,
add_on_exit_callback = ,
after = ,
after_failure = ,
after_success = ,
and_then = ,
and_then_on_failure = ,
and_then_on_failure_wrap = ,
and_then_on_success = ,
and_then_on_success_wrap = ,
and_then_wrap = ,
chain = ,
chain_status = ,
co_wait = ,
is_job = ,
join = ,
new = ,
pid = ,
result = ,
send = ,
shutdown = ,
start = ,
stderr_result = ,
sync = ,
wait =
}
}
stack traceback:
.../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:405: in function '_execute'
.../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:448: in function 'start'
...site/pack/packer/start/plenary.nvim/lua/plenary/curl.lua:288: in function 'get'
.../pack/packer/start/nvim-html-css/lua/html-css/remote.lua:24: in function 'get_remote_styles'
.../pack/packer/start/nvim-html-css/lua/html-css/remote.lua:41: in function 'init'
...te/pack/packer/start/nvim-html-css/lua/html-css/init.lua:66: in function <...te/pack/packer/start/nvim-html-css/lua/html-c
ss/init.lua:65>
stack traceback:
[C]: in function 'error'
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:18: in function 'callback_or_next'
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:45: in function 'step'
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:48: in function 'execute'
...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:108: in function 'run'
...te/pack/packer/start/nvim-html-css/lua/html-css/init.lua:65: in function <...te/pack/packer/start/nvim-html-css/lua/html-c
ss/init.lua:36>
[C]: in function 'require'
/Users/wouter/.config/nvim/after/plugin/cmp.lua:31: in main chunk
this is my cmp.lua :
local cmp_status, cmp = pcall(require, "cmp") ■ Unused local `cmp_status`.
29 cmp.setup({
28 sources = cmp.config.sources {
27 {
26 name = "html-css",
25 option = {
24 max_count = {}, -- not ready yet
23 enable_on = {
22 "html",
21 "php"
20 }, -- set the file types you want the plugin to work on
19 file_extensions = { "css", "sass", "less" },
18 style_sheets = {
17 -- example of remote styles, only css no js for now
16 "https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css",
15 },
14 },
13 },
12
11 },
10 -- enable filename path for css config
9 formatting = {
8 format = function(entry, vim_item)
7 if entry.source.name == "html-css" then
6 vim_item.menu = entry.source.menu
5 end
4 return vim_item
3 end
2 }
1 })
31 require("html-css"):setup();
and this is what I have in my packer.lua :
use("Jezda1337/nvim-html-css")
I didn't test on Packer but, can you try this? and do you have installed dependencies?
use {
"Jezda1337/nvim-html-css"
requires = {"nvim-treesitter/nvim-treesitter", "nvim-lua/plenary.nvim"},
config = function() require("html-css"):setup() end,
}
Thanks for the quick response! The error seems to go away with this ^ . However when I try it in a html file it doesn't work.
I have installed the dependencies aswel "nvim-lua/plenary.vim" and "nvim-treesitter/nvim-treesitter"
Thanks for taking ur time to help me out! I think I got a step closer to getting it to work however now I have this error:
Error while calling lua chunk: .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:499: 'fd -a -e html --exclude node_modules' was unable to complete in 5000 ms
in main chunk cmp.lua line 82:
require("html-css"):setup();
Ye, the moment when you open neovim in root folder, plugin start scanning for all html files in root or in sub folders, then start parsing each file, so I believe that you have too much html files, and the plugin can't parse them all at once. This is issue with the plugin, if you check in some other project where you have less html files its gonna work. I'm currently soo busy with the work, but I will give my best to find time and work on the plugin.
@wouterschiedam The problem is in lsp-zero v1, not sure what is the problem, to solve that I need to dig in the source code of lsp-zero, but the easiest solution is to migrate to version 3. I manage to run the plugin with this change:
branch = 'v3.x',
Reading the code and trying couple of times, I was 100% that the plugin is loaded but the it being ignored for some reason, then I load developer version and put some logs but nothing happened, then I notice lsp-zero v1 and I know there was huge upgrade v3. V1 for some reason was blocking external plugins like nvim-html-css so I just end up upgrading the plugin and works, I try as well to add my plugin as dependencies to lsp-zero that din't work in v1, didn't try for v3.
Hi, im quite new to the whole vim experience I came across your plugin and it looks awesome however im having some trouble trying to install it correctly I keep getting the following error:
Error while calling lua chunk: ...ck/packer/start/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:405: Failed to spawn process: { _additional_on_exit_callbacks = {}, _shutdown_check = <userdata 1>, _stderr_results = {}, _stdout_results = {}, _user_on_exit = <function 1>, args = { "-sSL", "-D", "/tmp/plenary_curl_f8ef4cfe.headers", "--compressed", "-X", "GET", "http://en.wikipedia.org/wiki/Michael_Col lins_(astronaut)" }, command = "curl", enable_handlers = true, enable_recording = true, interactive = true, pid = "EMFILE: too many open files", stderr = <userdata 2>, stdin = <userdata 3>, stdout = <userdata 4>, user_data = {},
I didn't test on Packer but, can you try this? and do you have installed dependencies? use { "Jezda1337/nvim-html-css" requires = {"nvim-treesitter/nvim-treesitter", "nvim-lua/plenary.nvim"}, config = function() require("html-css"):setup() end, }
Thanks for the quick response! The error seems to go away with this ^ . However when I try it in a html file it doesn't work. I have installed the dependencies aswel "nvim-lua/plenary.vim" and "nvim-treesitter/nvim-treesitter"
You need to install this as well: fd
I've read in another issue about this I installed it already with brew install fd.
Can you share CmpStatus log?
when I run :CmpStatus I get this:
ready source names
unavailable source names
unused source names
Do you have .git/ folder or pacakge.json file inside ur root project? this two trigger plugin to be active in current work directory
yes I have a .git/ folder in the root of my documents this is also where I open nvim
Okay, later today I will test with packer and will try to reproduce your problem
Awesome thanks for the help! I'm new to vim so it is all quite new to me
Hey @wouterschiedam here is my packer example which works: https://gist.github.com/Jezda1337/d74c22070e523a59885ba4d3c71af2dd
Thanks for taking ur time to help me out! I think I got a step closer to getting it to work however now I have this error:
Error while calling lua chunk: .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:499: 'fd -a -e html --exclude node_modules' was unable to complete in 5000 ms
in main chunk cmp.lua line 82: require("html-css"):setup();
How many html files you have in your root folder?
In the root 0, but I have a lot in sub folders
Ye, the moment when you open neovim in root folder, plugin start scanning for all html files in root or in sub folders, then start parsing each file, so I believe that you have too much html files, and the plugin can't parse them all at once. This is issue with the plugin, if you check in some other project where you have less html files its gonna work. I'm currently soo busy with the work, but I will give my best to find time and work on the plugin.
Hmmm that makes sense. No worries. I've created a new folder with a ./git folder and an index.html file but it still doesn't work :(
Strange, do you have your neovim config somewhere on the internet, so I can take a look and investigate more? what CmpStatus said now?
This is what my CmpStatus says:
ready source names
unused source names
unknown source names
Can you make a package.json file inside the root folder and try again?
Still not working im, gonna publish my nvim setup maybe u can see what I'm doing wrong
That would be the best
https://github.com/wouterschiedam/nvim-vetup
@wouterschiedam The problem is in lsp-zero v1, not sure what is the problem, to solve that I need to dig in the source code of lsp-zero, but the easiest solution is to migrate to version 3. I manage to run the plugin with this change: branch = 'v3.x',
Yess it works now in html files but the option for other files isn't. thanks for helping out! still a bit curious how did u debug this problem?
Reading the code and trying couple of times, I was 100% that the plugin is loaded but the it being ignored for some reason, then I load developer version and put some logs but nothing happened, then I notice lsp-zero v1 and I know there was huge upgrade v3. V1 for some reason was blocking external plugins like nvim-html-css so I just end up upgrading the plugin and works, I try as well to add my plugin as dependencies to lsp-zero that din't work in v1, didn't try for v3.