mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-12-26 09:22:00 +08:00
Keep indentation when pasting code into the editor (#779)
This commit is contained in:
parent
973fc51c9d
commit
ee2602c932
1 changed files with 4 additions and 10 deletions
|
@ -164,6 +164,10 @@ class LiveEditor {
|
|||
fontFamily: "JetBrains Mono, Droid Sans Mono, monospace",
|
||||
fontSize: 14,
|
||||
tabIndex: -1,
|
||||
tabSize: 2,
|
||||
autoIndent: true,
|
||||
formatOnType: true,
|
||||
formatOnPaste: true,
|
||||
quickSuggestions:
|
||||
this.type === "elixir" && settings.editor_auto_completion,
|
||||
tabCompletion: "on",
|
||||
|
@ -176,16 +180,6 @@ class LiveEditor {
|
|||
parameterHints: this.type === "elixir" && settings.editor_auto_signature,
|
||||
});
|
||||
|
||||
this.editor.getModel().updateOptions({
|
||||
tabSize: 2,
|
||||
});
|
||||
|
||||
this.editor.updateOptions({
|
||||
autoIndent: true,
|
||||
tabSize: 2,
|
||||
formatOnType: true,
|
||||
});
|
||||
|
||||
// Automatically adjust the editor size to fit the container.
|
||||
const resizeObserver = new ResizeObserver((entries) => {
|
||||
entries.forEach((entry) => {
|
||||
|
|
Loading…
Reference in a new issue