On Thu, Jun 20, 2024 at 5:46 AM João Távora wrote: > > On closer analysis the only confusing thing is that the spec > encourages clients to call textDocument/executeCommand with > illegal ExecuteCommandParams objects that contain an extraneous > 'title' > > Most servers apparently don't care, but Eglot is doing this and > it's a subtle bug. > > I think the right thing to do is to have Command _and_ > ExecuteCommandParams in the matcher. > Thanks for the explanation. > I've done a tweak to your patch. See after my sig. It's untested, so > please have a look. If you can, test, add more comments, change the order > if indeed it's needed. You can also change the implementation if you think > the recursiveness makes it more confusing. > I've updated the patch based on your suggestions. I've tested all invocations of executeCommand through Command, ExecuteCommandParams and CodeAction and they all appear to be working as expected now. I think the recursion is fine, it's simple and elegant. With regards to the order, you are correct, since the command in CodeAction isn't a string, it's not a problem. I was previously erroneously only testing with a string.