This is my first time writing here (and also I'm not native speaker) so please be indulgent.
I'm new to LateX so if you could also keep your answer as simple as possible, it would be very nice. So here is mmy problem: I'm tiping my report and I need to draw lots of feynman diagrams. I read the documentation about tikzpicture / tikz feynman etc and succesfully drawn lots of picture but I have a recurrent problem trying to draw fermion loop. I attached a picture so that it will be clear what the problem is. As you can see, the loop doesn't close. Here is my code which seems pretty good from my point of view. I succesfully dodge this bug once doing some weird/absurd manipulations but I couldn't manage to fix it since.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{bbold}
\usepackage[10pt]{extsizes}
\usepackage{geometry}
\geometry{hmargin=1.5cm,vmargin=1.5cm}
\geometry{top=2.0cm,bottom=2.5cm}
\usepackage{graphicx}
\usepackage{sidecap}
\usepackage{slashed}
\usepackage{multicol}
\usepackage{wrapfig}
\usepackage{float}
\usepackage{tikz}
\usepackage[compat=1.1.0]{tikz-feynman}
\usepackage{minitoc}
\usepackage{hyperref}
\usepackage{mathtools, bm}
\usepackage{amssymb, bm}
\usepackage{dsfont}
\usepackage{array}
\usepackage{xspace}
\newcommand{\ket}[1]{\ensuremath{|#1\rangle}\xspace}
\newcommand{\bra}[1]{\ensuremath{\langle #1|}\xspace}
\newcommand{\psh}[2]{\ensuremath{\langle #1|#2\rangle}\xspace}
\setlength{\columnsep}{2cm}
\begin{document}
...(My report) ...
\begin{equation}
\begin{tikzpicture}[baseline=-\the\dimexpr\fontdimen22\textfont2\relax]
\begin{feynman}
\vertex (a){};
\vertex[right=1.5cm of a] (b){};
\vertex[right=0.4cm of b] (c){};
\vertex[right=1.5cm of c] (d){};
\diagram*{
(a) -- [gluon, momentum=\(k\)] (b),
(b) -- [fermion,momentum=\(p+k\),half left, looseness=1.6] (c),
(c) -- [fermion, momentum=\(p\), half left, looseness=1.6] (b),
(c) -- [gluon,momentum=\(k\)] (d),
};
\end{feynman}
\end{tikzpicture}
\end{equation}
... (report) ...
\end{document}
Thank you all for helping me, I hope it's just an obvious thing that I've been missing for so long.
NB: I'm using overleaf online as well as LuaLateX compilator