marlonfan / coc-phpls

🐭 php language server for coc.nvim
MIT License
212 stars 16 forks source link

coc-rename silently ignores the command #65

Closed rosmanov closed 4 years ago

rosmanov commented 4 years ago

Sorry, I have no minimal test case, since the issue occurs only in a large closed-source project.

In about half of the time, coc-rename command silently terminates without any message and, more importantly, no action. For example, I have an interface with a method and a class implementing the interface. Now I put cursor over the method name in the interface, and press <leader>rn which is mapped as follows:

nmap <leader>rn <Plug>(coc-rename)

After that, a prompt suggesting to enter new name appears. I enter a new name, then press Enter. Then nothing -- no modified buffers, no changes at all. But sometimes, mostly with private and protected members, the same procedure works fine.

Now the question is how do I go about this issue? Should I look at a log file or something?

By the way, similar thing happens when I try to find references of the problematic method using coc-references command. But this command seems to be blocking, since Nvim hangs for about 5 seconds before returning control to me. Then, again, nothing happens -- no references, no messages, nothing. But coc-implementation still finds implementations of the method without any issues.

Thanks.

rosmanov commented 4 years ago

I think I fixed the issue by increasing number of files limit from 1024 to 8192. After that, the issue has gone.

There was a number of errors from libuv complaining about "too many open files":

ERROR 2019-05-26T21:34:18.600 7927  libuv_process_spawn:79: uv_spawn failed: too many open files
...

So I thought it was likely that the parser leaved a lot of files open, and that was the reason of the issue.