How can I make CodeEdit behave like a LineEdit while keeping syntax highlighting and autocomplete?

Godot version 4.6.2

Hi,
I want to use CodeEdit for a command console because I need syntax highlighting and autocomplete, but I want it to behave like a LineEdit.
Is there a recommended way to make CodeEdit single-line (Enter submits, no new lines, paste stays on one line, etc.) while keeping its editor features?
Any suggestions would be appreciated.