Is KHF2 an ionic compound or a covalent compound? The statement below is an excerpt from my school textbook:-


  Because of the tendency of fluorine to form hydrogen bond, metal
  fluorides are solvated by $\ce{HF}$ giving species of the type $\ce{HF2-}$ like in $\ce{KHF2(KF.HF)}$. Also,  because of hydrogen bonding, $\ce{HF}$ dimerises to $\ce{H2F2}$ and exhibits dibasic nature and forms acid salt like $\ce{KHF2}$ on reacting with $\ce{KOH}$ whereas $\ce{KHCl2}$ does not exist because chlorine does not form hydrogen bond.


But since $\ce{K+}$ is a cation and  $\ce{HF2-}$ is an anion, it can easily form the ionic bond $\ce{K+HF2-}$. So, is KHF2  an ionic compound $\ce{K+HF2-}$ or a covalent compound $\ce{KHF2(KF.HF)}$?
Yes, $\ce{KHF2}$ is an ionic compound and a covalent compound. There is nothing exceptional about it; in fact, most compounds that we call ionic (not $\ce{NaCl}$, though) have covalent bonds in them. Consider $\ce{MgSO4}$ with ionic bonds between $\ce{Mg^2+}$ and $\ce{SO4^2-}$, and covalent $\ce{S-O}$ bonds within $\ce{SO4^2-}$. Consider $\ce{Na2CO3}$ with similar $\ce{C-O}$ bonds. These are the ways of the world.