[ty] Use python version and path from Python extension (#19012)

This commit is contained in:
Micha Reiser 2025-07-14 11:47:27 +02:00 committed by GitHub
parent 26f736bc46
commit 90026047f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 344 additions and 99 deletions

View file

@ -40,22 +40,16 @@ impl SyncNotificationHandler for DidChangeTextDocumentHandler {
.update_text_document(&key, content_changes, version)
.with_failure_code(ErrorCode::InternalError)?;
match key.path() {
let changes = match key.path() {
AnySystemPath::System(path) => {
let db = match session.project_db_for_path_mut(path) {
Some(db) => db,
None => session.default_project_db_mut(),
};
db.apply_changes(vec![ChangeEvent::file_content_changed(path.clone())], None);
vec![ChangeEvent::file_content_changed(path.clone())]
}
AnySystemPath::SystemVirtual(virtual_path) => {
let db = session.default_project_db_mut();
db.apply_changes(
vec![ChangeEvent::ChangedVirtual(virtual_path.clone())],
None,
);
vec![ChangeEvent::ChangedVirtual(virtual_path.clone())]
}
}
};
session.apply_changes(key.path(), changes);
publish_diagnostics(session, &key, client);