Sardinia had been a territory of the Kingdom of Aragon since 1323, and, with the union of Aragon with Castile in 1469, part of the new kingdom of Spain. During the period of Aragonese and later Spanish rule, Sardinian culture adopted some new Spanish traditions and customs, bringing the island closer to the mainland. Spain lost Sardinia in 1708, after the War of Spanish Succession. Spain then reconquered the island for a brief period of time before being defeated by the Quadruple Alliance. Spain lost the island permanently with the Treaty of London in 1718, in which the island was awarded to the House of Savoy.
However, what if Spain had somehow retained Sardinia? Perhaps Spain manages to escape the War of Spanish Succession with its rule over Sardinia intact, or Spain reaches a limited victory in the War of the Quadruple Alliance, where the Quadruple Alliance would have to recognize Spain's reconquest of the island.
How would this affect Spanish history? Could Spain realistically retain Sardinia up to the present day? What about Italian unification? Would the House of Savoy take more of an interest in Corsica as a result? How would this affect the cultural and linguistic identity of Sardinia as a whole?