That seems to have fixed it. Can you explain what's going on here? To my untutored eye, it looks we're doing the following:
- In addition to defining the "buffer" variable from the "uri", we're now also defining "path" from the "uri".
- Using the value of "path" to purge all entries from "flymake-list-only-diagnostics" whose key is string= to the "path".
- Further down in the function, no longer setting "path" while using cl-loop to loop over "diagnostics", presumably because that's redundant now that "path" has been defined above.
Broadly, it looks like diagnostics were sorta *cached* and if the eglot backed publishes an empty set of diagnostics for a file (i.e., the file has been corrected) then we make sure to purge the stale cache. Or something like that. Am I close?
Thanks!
David