Good luck, OP. I've never heard of Kakoune but its source code isn't too huge yet.
$ cloc src/
136 text files.
136 unique files.
1 file ignored.
github.com/AlDanial/cloc v 1.84 T=0.14 s (959.2 files/s, 252170.7 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
C++ 56 3158 208 21877
C/C++ Header 78 1981 179 7894
make 1 34 2 157
-------------------------------------------------------------------------------
SUM: 135 5173 389 29928
-------------------------------------------------------------------------------