Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/requests/init.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function ServerCapabilities(client::ClientCapabilities)
TextDocumentSyncKinds.Full,
false,
false,
SaveOptions(true)
SaveOptions(false)
),
CompletionOptions(false, [".", "@", "\"", "^"], missing),
true,
Expand Down
11 changes: 0 additions & 11 deletions src/requests/textdocument.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,13 @@ function textDocument_didClose_notification(params::DidCloseTextDocumentParams,
end
end


function textDocument_didSave_notification(params::DidSaveTextDocumentParams, server::LanguageServerInstance, conn)
uri = params.textDocument.uri
doc = getdocument(server, uri)
if params.text isa String
if get_text(doc) != params.text
JSONRPC.send(conn, window_showMessage_notification_type, ShowMessageParams(MessageTypes.Error, "Julia Extension: Please contact us! Your extension just crashed with a bug that we have been trying to replicate for a long time. You could help the development team a lot by contacting us at https://github.com/julia-vscode/julia-vscode so that we can work together to fix this issue."))
throw(LSSyncMismatch("Mismatch between server and client text for $(get_uri(doc)). _open_in_editor is $(doc._open_in_editor). _workspace_file is $(doc._workspace_file). _version is $(get_version(doc))."))
end
end
parse_all(doc, server)
end


function textDocument_willSave_notification(params::WillSaveTextDocumentParams, server::LanguageServerInstance, conn)
end


function textDocument_willSaveWaitUntil_request(params::WillSaveTextDocumentParams, server::LanguageServerInstance, conn)
return TextEdit[]
end
Expand Down