And when you will discover MSEgui, the best widgetset that only needs X.org dependencies, that has docking feature and style that can mimic GTK1, GTK2, GTK3, GTKx, Qt4 to x, KDE, Carbon, all Windows versions, is extremely more stable than his brothers and is 100% pure Pascal, compatible from fpc 2.6.4 to 3.3.1, you will be aware that the Linux word is divided between MSEgui and the others.
The Linux word...
Ooops, I forgot the l.
So I (and others??) should fork CudaText and port it to MSEgui and convince Alex to accept the PR....
Indeed it would be The solution.
Note that after the jump into MSEgui ( yes, I agree, needs some effort) all the wigdgets that are in LCL exist in MSEgui.
So all the methods used in LCL should only be copied.
And because MSEgui is not yet ready for Mac, you will keep the LCL version.
To resume, adapt your code/unit to be able to choose any widgetset you want (LCL or other, like MSEgui).
Sincerely it is not so big work (I have some projects LCL/MSEgui) and it is fun and you may discover hidden things usable for LCL too.