Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate why didSave notification is not sent if view closed immediately after saving #2461

Open
jwortmann opened this issue Apr 21, 2024 · 0 comments

Comments

@jwortmann
Copy link
Member

When a file is saved, a textDocument/didSave notifications should be sent to the server if it opts-in via TextDocumentSyncOptions.

But if the file gets closed immediately after saving, the notification is not sent (at least here on Windows, and apparently also on CI on all OS, but according to #2438 (comment) it seems to work in practice on Linux).

Key binding example:

    {
        "keys": ["f1"],
        "command": "chain",
        "args": {
            "commands": [
                ["save", {"async": false}],
                ["close", {}]
            ]
        }
    },

I expect to see textDocument/didSave in the LSP server log panel before textDocument/didClose, but it's missing.

If this gets fixed, this line in the tests could be uncommented:

# yield from self.await_message('textDocument/didSave') # TODO why is this not sent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant