Context. The nearby Large Magellanic Cloud (LMC) provides a rare opportunity of a spatially resolved view of an external star-forming galaxy in γ-rays. The LMC was detected at 0.1-100 GeV as an extended source with CGRO/EGRET and using early observations with the Fermi-LAT. The emission was found to correlate with massive star-forming regions and to be particularly bright towards 30 Doradus. Aims. Studies of the origin and transport of cosmic rays (CRs) in the Milky Way are frequently hampered by line-of-sight confusion and poor distance determination. The LMC offers a complementary way to address these questions by revealing whether and how the γ-ray emission is connected to specific objects, populations of objects, and structures in the galaxy. Methods. We revisited the γ-ray emission from the LMC using about 73 months of Fermi-LAT P7REP data in the 0.2-100 GeV range. We developed a complete spatial and spectral model of the LMC emission, for which we tested several approaches: a simple geometrical description, template-fitting, and a physically driven model for CR-induced interstellar emission. Results. In addition to identifying PSR J0540−6919 through its pulsations, we find two hard sources positionally coincident with plerion N 157B and supernova remnant N 132D, which were also detected at TeV energies with H.E.S.S. We detect an additional soft source that is currently unidentified. Extended emission dominates the total flux from the LMC. It consists of an extended component of about the size of the galaxy and additional emission from three to four regions with degree-scale sizes. If it is interpreted as CRs interacting with interstellar gas, the large-scale emission implies a large-scale population of ∼1-100 GeV CRs with a density of ∼30% of the local Galactic value. On top of that, the three to four small-scale emission regions would correspond to enhancements of the CR density by factors 2 to 6 or higher, possibly more energetic and younger populations of CRs compared to the large-scale population. An alternative explanation is that this is emission from an unresolved population of at least two dozen objects, such as pulsars and their nebulae or supernova remnants. This small-scale extended emission has a spatial distribution that does not clearly correlate with known components of the LMC, except for a possible relation to cavities and supergiant shells. Conclusions. The Fermi-LAT GeV observations allowed us to detect individual sources in the LMC. Three of the newly discovered sources are associated with rare and extreme objects. The 30 Doradus region is prominent in GeV γ-rays because PSR J0540−6919 and N 157B are strong emitters. The extended emission from the galaxy has an unexpected spatial distribution, and observations at higher energies and in radio may help to clarify its origin.