RRethy / vim-illuminate

illuminate.vim - (Neo)Vim plugin for automatically highlighting other uses of the word under the cursor using either LSP, Tree-sitter, or regex matching.
2.12k stars 44 forks source link

Super slow LSP (solved) #160

Closed kiyoon closed 1 year ago

kiyoon commented 1 year ago

I had this extremely weird behaviour. It happened when I activate a conda environment with lots of packages installed.

Screencast from 07-02-23 20:29:05.webm

It took me hours to figure out the source of the problem. I noticed that if I remove require('illuminate').on_attach(client) in LSP attach, the problem went away.

I thought it's good to share if anyone face the same issue. Also, I want to know why this kind of stuff happens in the old version? Maybe you know why, and you can maybe just remove the deprecated function (or make it do nothing).

RRethy commented 1 year ago

It's not clear why that deprecated API would be slow without steps to reproduce.

and you can maybe just remove the deprecated function (or make it do nothing).

This would break backwards compatibility. Breaking a users config randomly isn't a great experience.

Closing the issue since this isn't something that has come up and support for deprecation functionality is limited.

kiyoon commented 1 year ago

If you make it do nothing (and use the recent way to detect LSP automatically), I don't think it will break the backwards compatibility. But fair enough, it was just a suggestion.

RRethy commented 1 year ago

I pushed a change, it may fix it but I'm not sure, if you have time can you try reproducing with the deprecated API. If not no worries, this isn't high priority.

kiyoon commented 1 year ago

Hi, thanks for taking a look. I got this error: image

Tbh I don't know how exactly I can reproduce the issue but I think it happens when I have a conda environment with lots of lots of packages installed.

RRethy commented 1 year ago

Reverted, will leave as is for now.