Abstract In this work, we investigate a generalized Kadomtsev–Petviashvili equation with variable coefficients and self-consistent sources in plasma and fluid mechanics. The multiple rogue wave solutions, including 1-, 3-, and 6-order rogue waves, are presented by three different functions under a nonlinear transformation. Based on the Hirota bilinear method and a more complex assumption, new lump solutions are constructed, which have not been seen in other literature. The dynamic properties of the obtained results are illustrated graphically.