marlonfan / coc-phpls

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

Wrong error and underline while editing php files #30

Closed dinhtungdu closed 4 years ago

dinhtungdu commented 4 years ago

Describe the bug When I'm editing PHP files, sometimes the editor shows me the error for the correct piece of code. For example when I delete a couple of line of code as the screenshot below. coc/phpls then remove the error after that, but the underline lines remain. This issue happens randomly.

P.S: I don't know if this is the right place to report this bug, but I don't have this bug with tsserver. If it's coc.nvim bug, feel free to close this issue :).

Expected behavior The underline should be removed with the wrong error.

Screenshots The wrong errors:

After coc/phpls hide the error:

Desktop (please complete the following information):

marlonfan commented 4 years ago

Please provide your verbose output.

  1. change phpls.trace.server to verbose
  2. call :CocCommand workspace.showOutput
  3. CocOpenLog
dinhtungdu commented 4 years ago

Thanks for the reply! Here it is: https://pastebin.com/JF83H9Re

marlonfan commented 4 years ago

I did not find the error log in the file, is it not fully committed?

dinhtungdu commented 4 years ago

When I run CocOpenLog, this is what I get:

2019-09-26T10:29:29.589 INFO (pid:93454) [services] - registed service "highlight"
2019-09-26T10:29:29.616 INFO (pid:93454) [language-client-index] - highlight started with 93462
2019-09-26T10:29:29.625 INFO (pid:93454) [plugin] - coc 0.0.73-56825890dc initialized with node: v10.15.1
2019-09-26T10:29:29.716 INFO (pid:93454) [services] - highlight server state change: starting => running
2019-09-26T10:29:33.128 INFO (pid:93454) [language-client-index] - phpls started with 93472
2019-09-26T10:52:44.249 INFO (pid:93454) [completion-complete] - Results from: around,buffer,phpls
2019-09-26T10:53:49.692 INFO (pid:93454) [completion-complete] - Results from: buffer,phpls
2019-09-26T10:54:31.200 INFO (pid:93454) [completion-complete] - Results from: phpls
2019-09-26T10:54:33.759 INFO (pid:93454) [completion-complete] - Results from: phpls
2019-09-26T10:54:36.691 INFO (pid:93454) [completion-complete] - Results from: around,buffer
2019-09-26T10:54:41.967 INFO (pid:93454) [completion-complete] - Results from: phpls
dinhtungdu commented 4 years ago

The issue usually happens after I edit files for a while. I don't see the error in the log as well. Do I need to provide the result of CocCommand workspace.showOutput again, it's a 100k lines file

dinhtungdu commented 4 years ago

Looks like updating coc.nvim to latest version solved this issue. Thanks for your time :).