[ES|QL] indentation improvements (#217255)

## Summary

The formatter uses a tab size of 2 spaces. The editor should follow suit
so that it is easy to keep the formatting.

Also, the editor should keep the current indentation automatically.





https://github.com/user-attachments/assets/8c89b33a-2ba3-4332-a858-c5b8cb9c65dd

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
This commit is contained in:
Drew Tate 2025-04-07 06:16:32 -06:00 committed by GitHub
parent e71ea24e0f
commit c34f74ff3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -681,7 +681,7 @@ export const ESQLEditor = memo(function ESQLEditor({
above: false,
},
accessibilitySupport: 'off',
autoIndent: 'none',
autoIndent: 'keep',
automaticLayout: true,
fixedOverflowWidgets: true,
folding: false,
@ -713,6 +713,7 @@ export const ESQLEditor = memo(function ESQLEditor({
verticalScrollbarSize: 6,
},
scrollBeyondLastLine: false,
tabSize: 2,
theme: ESQL_LANG_ID,
wordWrap: 'on',
wrappingIndent: 'none',