To get started with LineageOS sources to build TWRP, you'll need to get familiar with Git and Repo.
To initialize your local repository using the LineageOS trees to build TWRP, use a command like this:
repo init -u git://github.com/TeamExyKings/twrp_minimal_manifest.git -b lineage-15.1
Then to sync up:
repo sync
Then to build:
cd <source-dir>; . build/envsetup.sh; lunch lineage_<device>-eng; mka recoveryimage