-
Notifications
You must be signed in to change notification settings - Fork 162
EnableIndexOnDidChange not working as expected #692
Comments
Well, I did the printf hack and it solved me problem:
This shows that cquery's view of the file has not become corrupted as I suspected. Unfortunately, after renaming a symbol, or after simpler bits of editing, highlighting for the new symbol name stops working correctly, returns invalid regions or stops working altogether. It starts working again after a I have renamed the issue. It is also being analysed at joaotavora/eglot#9 |
FWIW, the same problem happens with the |
The document is not reindexed until you save a file. cquery has heuristics to make this work a bit better, but it is not perfect. You can set enableIndexOnDidChange to reindex on edit. This is off by default because it is too slow for large projects - cquery defaults are optimized for large projects. |
I was able to reproduce this even with
I dug around for a bit this last weekend and couldn't track down a root cause. I'm planning on spending a bit more time shooting this this weekend, though. Edit: just to clarify, after renaming a symbol, autocompletion works with the new name (in my above example, I can access all of
|
I have renamed the issue, I hope you can reopen it in light of what I explain below. (BTW, @jaelsasser the option's name is @jacobdufault, I can confirm that even after enabling Also, in the didChange handler, I confirmed that the changes that the Eglot client sends in are being correctly parsed and applied to the in-memory copy. |
@jacobdufault, ping? Can you confirm that you've read my last message? Are you aware of any language server client that sends |
Yes, this sounds reasonable. Need to investigate though. |
I'm building Eglot, an alternative Emacs client to cquery.
It's coming along fine and cquery behaves nicely (the latest "Lantern Festival" release, that is, because I can't get the latest master to build, see #691).
Anyway I'm having trouble when renaming symbols (which leads to a
didChange
notification from client to server). I suspect cquery's view of the file's state has become corrupted. I don't know if it is my client's fault or cquery's. Is there a way to query cquery about what it thinks a file's contents are, or do I have to hack the code and put a giantprintf
there??The text was updated successfully, but these errors were encountered: