  In the present work, we extend the $f(Q)$ symmetric teleparallel gravity by
introducing an arbitrary coupling between the non-metricity $Q$ and matter
Lagrangian $L_m$ in the Lagrangian density $f$ of the theory, which thus leads
to the $f\left(Q,L_m\right)$ theory. This generalisation encompasses Coincident
General Relativity (CGR) and the Symmetric Teleparallel Equivalent to GR
(STEGR). Using the metric formalism, we derive the field equation of the
theory, which generalizes the field equations of $f(Q)$ gravity. From the study
of the covariant divergence of the field equations, it follows that the
presence of the geometry-matter coupling leads to the non-conservation of the
matter energy-momentum tensor. The cosmological implications of the theory are
investigated in the case of a flat, homogeneous, and isotropic
Friedmann-Lemaitre-Robertson-Walker geometry. As a first step in this
direction, we obtain the modified Friedmann equations for the $f(Q,L_m)$
gravity in a general form. Specific cosmological models are investigated for
several choices of $f(Q,L_m)$, including $f(Q,L_m)=-\alpha Q + 2L_m + \beta$,
and $f(Q,L_m)=- \alpha Q + (2L_m)^2 + \beta$, respectively. Comparative
analyses with the standard $\Lambda$ CDM paradigm are carried out, and the
observational implications of the models are investigated in detail.
