Jezda1337 / nvim-html-css

CSS Intellisense for HTML
115 stars 13 forks source link

Plenary Issues Again? #2

Closed Fausto-Korpsvart closed 10 months ago

Fausto-Korpsvart commented 12 months ago

Greetings again, @Jezda1337.

I've updated the plugin again and I've encountered a problem with Plenary again.

You know, I started to think that there was something wrong with my configuration, so I've tried with a general configuration and where I haven't touched anything but adding the html-css configuration, I'm talking about the configuration of: Nvim Kickstarter and the problem with Plenary is the same, so I've completely ruled out that my configuration has something wrong why the plugin doesn't work properly.

The delay problem is too noticeable, for example, when I opened my ZSH file in my $HOME directory, it took about 35 seconds to load and when loading it throws an error with Plenary, if I disable the html-css plugin Neovim works normally, as I said before, I thought there was something wrong with my configuration, but I tried Nvim Kickstarter and the error with Plenary and with delay in loading Neovim is the same as with my personal configuration.

This time I have made absolutely sure of every detail when configuring html-css and I have done it as you have recommended in the README, and I want to add that in the Kickstarter configuration, which uses lazynvim as plugin manager, the plugins don't use any events, as I said before, I used the default Kickstarter configuration and I always got the errors with Treesitter and Plenary, but by adding the same events to Treesitter, CMP and html-css, as you recommend, the error with Treesitter is fixed, but I still get the errors with Plenary.

I leave again some screenshots of the errors.

  1. Error when opening an HTML file and entering insert mode. As long as I don't enter insert mode, no error appears, but when I enter insert mode the error pops up. html-css-plenary-issue-again

  2. This is the error it throws when I open a file in the $HOME directory, in this case it was the ZSH configuration. html-css-delay-plenary-issue

I hope you can find the solution to make the plugin more stable, it is really very useful, it has become one of the necessary plugins in my setup, but it is very unstable at the moment.

Jezda1337 commented 12 months ago

Hey @Fausto-Korpsvart, thanks for the comprehended explanation, I wonder what external sources are you using to get styles and classes? I was trying Bootstrap, Bulma, and Materialize, and I don't have any lag or Neovim freeze at the start, but I also try the tailwind.min.css file and then I get a little lag at the start I will try to investigate that. Please share your style_sheets so I can try to reproduce errors. 🫡

Fausto-Korpsvart commented 12 months ago

Hey @Fausto-Korpsvart, thanks for the comprehended explanation, I wonder what external sources are you using to get styles and classes? I was trying Bootstrap, Bulma, and Materialize, and I don't have any lag or Neovim freeze at the start, but I also try the tailwind.min.css file and then I get a little lag at the start I will try to investigate that. Please share your style_sheets so I can try to reproduce errors. 🫡

@Jezda1337, Hi.

Well, It's a pretty basic project that I'm just starting, it doesn't have many files at the moment, two SASS sheets and a CSS file.

In the external sources I've added: SASS, which is the one I'm using for this project; I also added Materialize and Tailwind as tests, but the last two I only added for testing, so I have them commented together with Bulma and Bootstrap, so it's not such a big project.

And now I've noticed that it's not only when I go into insert mode that the error pops up, if I enter the HTML file and leave it for a moment without doing anything the error pops up after a few seconds.

I don't understand what could be affecting it, I have already tried a different Neovim configuration and even tried a minimal configuration just adding Treesitter, CMP, LSP and html-css, but the loading delay continues and the errors with Plenary always pop up.

Here is a short video.

https://github.com/Jezda1337/nvim-html-css/assets/47998118/5274e7bf-1904-4f9b-8a4b-c49de6e09cbc

Jezda1337 commented 12 months ago

Can you pls share links that you using inside style_sheets? I need links to try to reproduce same error? Can you, in the error message from above says something about twitter.com, I need links from your style_sheets table. Can you swap keyword config for init? init = function() require("html-css"):setup() end

Fausto-Korpsvart commented 12 months ago

Can you pls share links that you using inside style_sheets? I need links to try to reproduce same error? Can you, in the error message from above says something about twitter.com, I need links from your style_sheets table. Can you swap keyword config for init? init = function() require("html-css"):setup() end

Here are the links, it is as I currently have it configured.

   {
    name = 'html-css',
    option = {
        enable_on = { 'html' },
        file_extensions = { 'css', 'sass', 'less' },
        style_sheets = {
            'https://cdnjs.cloudflare.com/ajax/libs/sass.js/0.9.2/sass.min.js',
            --[[ 'https://unpkg.com/tailwindcss-jit-cdn',
            'https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css',
            'https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css',
            'https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css', ]]
        },
    },
   },

And regarding changing config = function() to init = function() I actually had it set to init, but checking the README I noticed it is config and changed it, but I had it set to init and the error always pops up.

I opened Neovim in my $HOME directory to see the dashboard plugin Alpha, and Neovim froze for almost 30 seconds, the terminal still works, then an error always pops up with Plenary, after disabling the html-css Neovim works normally.

I don't really know what's going wrong, but I'm going to have it disabled for a while, as I have a lot of work to finish, at the moment I can't be changing settings to find out where the error is coming from, once I finish my work I'll spend some time to see what's wrong.

The screenshot of the error. html-css-issues

Good luck, and thanks for taking the time to constantly improve this great plugin.

Jezda1337 commented 11 months ago

Hey @Fausto-Korpsvart, the problem that you have is related to the plugin because, when you start new instance of Noevim, the plugin try to read all html,css,scss,less files and download all external styes, and if you start neovim where is like 1000+ files, its gonna struggle. For now I have disable plugin if in root_dir is not .git folder, in case you are working with project that is not initialized by git, you can make .git folder just to use plugin. This solution is only temporary. Thanks for using the plugin, and for your contributions. And currently in style_sheets js files doesn't work, at last for me.

Fausto-Korpsvart commented 11 months ago

Hey @Fausto-Korpsvart, the problem that you have is related to the plugin because, when you start new instance of Noevim, the plugin try to read all html,css,scss,less files and download all external styes, and if you start neovim where is like 1000+ files, its gonna struggle. For now I have disable plugin if in root_dir is not .git folder, in case you are working with project that is not initialized by git, you can make .git folder just to use plugin. This solution is only temporary. Thanks for using the plugin, and for your contributions. And currently in style_sheets js files doesn't work, at last for me.

Thank you very much, @Jezda1337.

At the moment I have a bit of work to do, but when I have some time I will do it.

As always, thanks for constantly improving this great plugin.