dbeaver / dbeaver/dbeaver

Pressing Enter inside statements "begin-end", "if-end if" doesn't keep indentation level of a body of the statement

Open
#34,943 1 comment 0 reactions 0 assignees View on GitHub
xf:sql editor
Dominant language
Java
Stars
51.8k
Forks
4.4k
Avg merge
3d 13h
Merged PRs (30d)
183

Description

### Description

It is expected that the lines of the body of these statements have plus one additional level of indentation automatically when pressing Enter to move to the next line.

### DBeaver Version

Community Edition 24.1.3.202407122322

### Operating System

Windows 10

### Database and driver

PostgreSQL 16
PostgreSQL JDBC Driver 42.7.2

### Steps to reproduce

Here you can see that some random text has one level of indentation (it is correct) but when I start typing a select 1; with symbol ; at the end and then press Enter, there is no indentation (incorrect).
The body of a nested if-statement has no additional indentation level also (incorrect).

https://github.com/user-attachments/assets/0986cad7-87c1-4d56-af93-a88fb2847a57

### Additional context

Please also check this case for **anonymous blocks** as well as **body of function/procedure**.
Please also check **different kinds of statements** that have indentation: loop, begin, if, etc..
Please also check **multiple nested levels** of different operators (if ...loop ...if...loop... ).
Please also check **argument list** in procedure/function calls:
```
call public.my_proc (
arg1 => null,
arg2 => 'hello',
arg3 => 'world'
);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.