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

Allow to instruct the client to save a document. #6848

Merged
merged 1 commit into from
Dec 17, 2023

Conversation

sdedic
Copy link
Member

@sdedic sdedic commented Dec 14, 2023

The LSP client can be instructed to perform edits on certain files, but NBLS may need to force the client to commit its bufers to disk - in particular if the project build / metadata files are modified, so it can reload the up-to-date project state.

The message that forces the client to save the document is missing from the official LSP protocol. This PR adds a window/saveDocument request that instructs the client to save specified documents.

@sdedic sdedic added LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests labels Dec 14, 2023
@sdedic sdedic added this to the NB21 milestone Dec 14, 2023
@sdedic sdedic self-assigned this Dec 14, 2023
@sdedic sdedic requested a review from lahodaj December 15, 2023 05:41
Copy link
Contributor

@lahodaj lahodaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me.

@@ -292,6 +300,7 @@ export namespace NodeInfoRequest {
}
};


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: maybe remove this extra new line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in fae07f9

@sdedic sdedic force-pushed the lsp/client-save-document branch from 1f3eeb7 to fae07f9 Compare December 17, 2023 12:01
@sdedic sdedic merged commit f0d3c48 into apache:master Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants