mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-03-30 07:38:12 +00:00
revert tab function to live behavior
This commit is contained in:
@@ -22,6 +22,11 @@ import { css, cssLanguage } from '@codemirror/lang-css';
|
|||||||
import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
|
import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
|
||||||
import { autocompleteEmoji } from './autocompleteEmoji.js';
|
import { autocompleteEmoji } from './autocompleteEmoji.js';
|
||||||
import { searchKeymap, search } from '@codemirror/search';
|
import { searchKeymap, search } from '@codemirror/search';
|
||||||
|
import {closeBrackets} from "@codemirror/autocomplete"
|
||||||
|
|
||||||
|
const customClose = closeBrackets({
|
||||||
|
brackets: ["()", "[]", "{{}}"]
|
||||||
|
})
|
||||||
|
|
||||||
import * as themesImport from '@uiw/codemirror-themes-all';
|
import * as themesImport from '@uiw/codemirror-themes-all';
|
||||||
import defaultCM5Theme from '@themes/codeMirror/default.js';
|
import defaultCM5Theme from '@themes/codeMirror/default.js';
|
||||||
@@ -182,6 +187,7 @@ const CodeEditor = forwardRef(
|
|||||||
customKeymap,
|
customKeymap,
|
||||||
drawSelection(),
|
drawSelection(),
|
||||||
EditorState.allowMultipleSelections.of(true),
|
EditorState.allowMultipleSelections.of(true),
|
||||||
|
customClose,
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -209,8 +209,8 @@ const newPage = (view)=>{
|
|||||||
|
|
||||||
export default keymap.of([
|
export default keymap.of([
|
||||||
{ key: 'Tab', run: insertTabAtCursor },
|
{ key: 'Tab', run: insertTabAtCursor },
|
||||||
{ key: 'Shift-Tab', run: indentMore },
|
//{ key: 'Shift-Tab', run: indentMore },
|
||||||
{ key: 'Mod-Shift-Tab', run: indentLess },
|
{ key: 'Shift-Tab', run: indentLess },
|
||||||
{ key: 'Mod-b', run: makeBold },
|
{ key: 'Mod-b', run: makeBold },
|
||||||
{ key: 'Mod-i', run: makeItalic },
|
{ key: 'Mod-i', run: makeItalic },
|
||||||
{ key: 'Mod-u', run: makeUnderline },
|
{ key: 'Mod-u', run: makeUnderline },
|
||||||
|
|||||||
Reference in New Issue
Block a user