Is this something I need to trigger on my own in the LSP, or should that be handled by Nova? (And if I do need to trigger that, what is the best way to go about it?)
Yes, restarting the LSP does index the newly-created files. It just seems odd that it has to be restarted, instead of Nova just retriggering the indexing.
Nova should be providing all the notifications the language server should need to track new files, but you have to be able to tap into the RPC communication to diagnose. Does you language server offer an RPC logging?
Hi @jrf, thanks for weighing in. I don’t believe that logging is turned on, or is externally configurable – it’s installed via NPM and per the author only has internal logging available to him.
Is there something I can look for in the NPM package to see if this can be hooked into?
A truly generic solution would be to stick a proxy between Nova and the language server. Without googling anything first, I’d poke at haproxy or nginx at the tcp level, siphoning everything that goes through to a log file…
I’d be shocked if Nova didn’t have the facility to log it all buried in there somewhere, though maybe not in release builds, and certainly not documented.
For the TypeScript extension I’ve used a simple shell script and tee to see what’s being sent back and forth. It doesn’t always work but might be a starting place.
Based on my interpretation of the LSP spec, the server is primarily in charge of indexing behavior. I’d expect it should be based on proper capability registration and notifications for the DidCreateFile notification.
I would agree with that assumption. However, it seems that Nova may not be implementing the registration capabilities fully, as commented on by Logan: LSP import action error - #2 by logan