Skip to content

Commit 26b8989

Browse files
authored
Merge pull request #713 from code0-tech/feat/#710
Only shift + Tab inside EditorInput should create a new line
2 parents 68a4d9b + d462970 commit 26b8989

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/components/form/EditorInput.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ const THEME_SETTINGS = {
3737
selection: 'rgba(112,179,255,0.25)',
3838
selectionMatch: 'rgba(112,179,255,0.1)',
3939
fontSize: "0.8rem",
40+
fontFamily: '"Inter", sans-serif',
41+
letterSpacing: "-0.5px",
42+
fontWeight: "400",
4043
gutterBackground: 'transparent',
4144
gutterForeground: 'rgba(255,255,255, 0.5)',
4245
gutterBorder: 'transparent',
@@ -69,7 +72,10 @@ export const EditorInput: React.FC<EditorInputProps> = React.memo((props) => {
6972
} = props
7073

7174
const internalExtensions = React.useMemo<Extension[]>(
72-
() => language ? [...extensions, language] : extensions,
75+
() => {
76+
const base = language ? [...extensions, language] : extensions;
77+
return [...base];
78+
},
7379
[extensions, language]
7480
)
7581

@@ -108,6 +114,7 @@ export const EditorInput: React.FC<EditorInputProps> = React.memo((props) => {
108114
<CodeMirror extensions={internalExtensions}
109115
onChange={handleChange}
110116
theme={myTheme}
117+
indentWithTab={false}
111118
{...mergedProps}
112119
basicSetup={BASIC_SETUP}/>
113120
</InputWrapper>

0 commit comments

Comments
 (0)