The text editor KWrite has support for line numbers. This feature is disabled by default. You can enable it by few clicks.
From menu Settings select Configure Editor…
Navigate to Appearance. Select Borders tab, click Show line numbers and click OK.
Here you can see KWrite with enabled line numbers: