edgedb-cli
edgedb-cli copied to clipboard
Tab doesn't do anything
- EdgeDB Version: EdgeDB 1.0-alpha.4+dev.68.g2f119281
- EdgeDB CLI Version: edgedb-cli 1.0.0-alpha.4
- OS Version: gentoo linux
When writing any query pressing "tab" doesn't do anything at all. It should actually perform tabulation (whether by inserting spaces or actual tab characters). This is especially annoying with nested queries (I used to copy/paste them a lot so I didn't notice before).
Hm. I think tab is reserved for completion. We can probably do some magic to make it doing indentation, but not "tabulation" in the middle of the line, because that would conflict with completion (and yes, we don't have completion for queries yet, but we want to have).
I think that using it to indent if the line before the cursor contains only whitespace and to auto-complete otherwise is fine. Basically, the reasoning is that at the beginning of the line "autocomplete" could literally mean "indent please".
+1 to what Victor said. This is how CPython repl behaves, for instance.
Note from slack discussion:
- We want auto-formatting that makes Tab obsolete
- We want completion to eventually work on empty line like this:
edgedb> SELECT User {
....... <tab x 2>
(i.e. complete fields of the User type)