  In recent years, linear complementary pairs (LCP) of codes and linear
complementary dual (LCD) codes have gained significant attention due to their
applications in coding theory and cryptography. In this work, we construct
explicit LCPs of codes and LCD codes from function fields of genus $g \geq 1$.
To accomplish this, we present pairs of suitable divisors giving rise to
non-special divisors of degree $g-1$ in the function field. The results are
applied in constructing LCPs of algebraic geometry codes and LCD algebraic
geometry (AG) codes in Kummer extensions, hyperelliptic function fields, and
elliptic curves.
