CodeEdit is a specialized TextEdit designed for editing plain text code files. It has many features commonly found in code editors such as line numbers, line folding, code completion, indent management, and string/comment management.
There’s an open source project Text Forge, a modular text editor created fully in Godot, you can check it out here and maybe draw inspirations for your project: