Jezda1337 / nvim-html-css

CSS Intellisense for HTML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

It may parse some directories end up with ".html" as files

dddddjent opened this issue · comments

When I try to open my nvim at ~/Documents, it parses every files (or may be even directories?) end up with .html
So it generates this error:
image
I add a print() in hrefs.lua, and it prints the file name for me. Here's the result before the error:
image
However, this doesn't happen when I get into the directory above or inside. I don't know why it only happens at that specific dir.

Does your Documents dir contain .git folder or package.json file? and do you run nvim . inside Documents or you run in elsewhere and navigate to Documents dir?

I think there are no .git folder and package.json file. And I run nvim in Documents directly.

Plugin only works in dirs where .git/ or package.json file exist, can you share more details, whats is in your Documents folder, do you have nested projects maybe, or in ~/ home folder you have some projects that contains this files and folders that I mention above. Does nested folder rn folder from ~/ have .git or package.json file? I need these details so I can try to reproduce same problem.

My Documents folder is the /home/ljl(my user name)/Documents. It contains a lot of projects and files, and many of them contain .git folder. I created a ThirdParty folder under Documents, and put a gcc-linaro compiler (which can be seen in the screenshot above) inside. When the function comes to the directories end with .html/, it generates the error. And there's no .git/ or package.json in that compiler's folder

Error detected while processing /home/ljl/.config/nvim/init.lua:
E5113: Error while calling lua chunk: ...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: The coroutine failed with this message: .../.local/share/nvim/lazy/plenary.nvim/lua/plenary/job.lua:404: Failed to spawn process: {
_additional_on_exit_callbacks = {},
_shutdown_check = <userdata 1>,
_stderr_results = {},
_stdout_results = {},
_user_on_exit = <function 1>,
args = { "-sSL", "-D", "/run/user/1000/plenary_curl_fc354d0c.headers", "--compressed", "-X", "GET", "http://www.doxygen.org/index.html" },
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 = {},
= <1>{
__index = <table 1>,
_create_uv_options = <function 2>,
_execute = <function 3>,
_pipes_are_closed = <function 4>,
_prepare_pipes = <function 5>,
_reset = <function 6>,
_shutdown = <function 7>,
_stop = <function 8>,
add_on_exit_callback = <function 9>,
after = <function 10>,
after_failure = <function 11>,
after_success = <function 12>,
and_then = <function 13>,
and_then_on_failure = <function 14>,
and_then_on_failure_wrap = <function 15>,
and_then_on_success = <function 16>,
and_then_on_success_wrap = <function 17>,
and_then_wrap = <function 18>,
chain = <function 19>,
chain_status = <function 20>,
co_wait = <function 21>,
is_job = <function 22>,
join = <function 23>,
new = <function 24>,
pid = <function 25>,
result = <function 26>,
send = <function 27>,
shutdown = <function 28>,
start = <function 29>,
stderr_result = <function 30>,
sync = <function 31>,
wait = <function 32>
}
}
stack traceback:
.../.local/share/nvim/lazy/plenary.nvim/lua/plenary/job.lua:404: in function '_execute'
.../.local/share/nvim/lazy/plenary.nvim/lua/plenary/job.lua:447: in function 'start'
....local/share/nvim/lazy/plenary.nvim/lua/plenary/curl.lua:288: in function 'get'
...al/share/nvim/lazy/nvim-html-css/lua/html-css/remote.lua:24: in function 'get_remote_styles'
...al/share/nvim/lazy/nvim-html-css/lua/html-css/remote.lua:41: in function 'init'
...ocal/share/nvim/lazy/nvim-html-css/lua/html-css/init.lua:64: in function <...ocal/share/nvim/lazy/nvim-html-css/lua/html-css/init.lua:63>
stack traceback:
[C]: in function 'error'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:18: in function 'callback_or_next'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:45: in function 'step'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:48: in function 'execute'
...share/nvim/lazy/plenary.nvim/lua/plenary/async/async.lua:108: in function 'run'
...ocal/share/nvim/lazy/nvim-html-css/lua/html-css/init.lua:63: in function <...ocal/share/nvim/lazy/nvim-html-css/lua/html-css/init.lua:34>
[C]: in function 'require'
/home/ljl/.config/nvim/lua/user/cmp.lua:171: in main chunk
[C]: in function 'require'
/home/ljl/.config/nvim/init.lua:5: in main chunk
[html-css] Unable to connect to the URL: http://mxr.mozilla.org/comm-central/source/mozilla/netwerk/base/src/nsURLParsers.cpp
[html-css] Unable to connect to the URL: https://pagure.io/lohit, http://www.nongnu.org/freebangfont/downloads.html#mukti, https://dejavu-fonts.github.io/Download.html
[html-css] Unable to connect to the URL: http://www.suitable.com/tools/smslib.html
[html-css] Unable to connect to the URL: http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/update/src/updater/

Now I removed the folders with .html at the back, and then it gave me a new error. It seems like it's because I was not able to connect to some of the URLs. But I don't have any .git or package.json here, should this plugin still run?

No, if the root folder doesn't contain .git folder or package.json the plugin should not start.
Can you try this in your config?

{ "Jezda1337/nvim-html-css",
        dependencies = {
            "nvim-treesitter/nvim-treesitter",
            "nvim-lua/plenary.nvim"
        },
        config = function()
            require("html-css"):setup()
        end,
        event = 'VeryLazy'
    },

It generated the same kind of error.
image
I think it was lazy loaded.

Strange, I will try to reproduce the error.

I only reproduce the error by adding .git folder or package.json file inside my folder who contain nested projects. I believe you have .git/ folder inside your Documents, did you try ls -a to see hidden directories? By adding .git/ or package.json file to root folder who contains a lot of projects make this error for me. My folder structure is this:
workspaces/
-- Project-1
-- Projcet-2
-- Project 3
-- package.json
-- .git/
etc..

adding .git/ folder or package.json in workspaces directorium makes that error.
can you pls do ls -a and share screenshoot with me

Thanks for sharing image, git_proxy_set is the problem, somehow picking "git" and trigger the plugin. Basically, whenever you run neovim and in that root folder is something start with name "git" its gonna trigger the plugin. I will look at this later today.