Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
tmhglnd committed Jan 9, 2025
1 parent baa1f28 commit c90e0d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions packages/web/src/components/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,13 @@ const panicKeymap = (
};

// overwrites the default insertNewlineAndIndent command on Enter
const autoIndentKeymap = (
doc: Document
) => {
const autoIndentKeymap = (doc: Document) => {
// if any of the targets is part of the noAutoIndent setting in settings.json
const noIndent = noAutoIndent.includes(doc.target);
// overwrite the Enter with insertNewline
return noIndent ? Prec.high(
keymap.of([{ key: 'Enter', run: insertNewline }])
) : [];
return noIndent
? Prec.high(keymap.of([{ key: "Enter", run: insertNewline }]))
: [];
};

interface FlokSetupOptions {
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"sardine": "panic()",
"dummy": "silence"
},
"noAutoIndent": [ "mercury", "mercury-web" ],
"noAutoIndent": ["mercury", "mercury-web"],
"webTargets": ["hydra", "mercury-web", "punctual", "strudel"],
"repoUrl": "https://github.com/munshkr/flok",
"changeLogUrl": "https://github.com/munshkr/flok/blob/main/CHANGELOG.md#changelog"
Expand Down

0 comments on commit c90e0d6

Please sign in to comment.