Skip to content

Commit 359833b

Browse files
author
jialan
committed
feat: add website default snippet config
1 parent ca2753d commit 359833b

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

website/src/App.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,26 @@ import { create, Workbench } from '@dtinsight/molecule';
44
import InstanceService from '@dtinsight/molecule/esm/services/instanceService';
55
import { ExtendsWorkbench } from './extensions/workbench';
66
import { version, dependencies } from '../../package.json';
7-
7+
import { editor } from 'monaco-editor';
88
import './languages';
99

1010
import '@dtinsight/molecule/esm/style/mo.css';
11+
1112
import './App.css';
1213

14+
/**
15+
* Allow code completion when typing in snippets.
16+
*
17+
* You can also set configurations when creating monaco-editor instance
18+
*/
19+
editor.onDidCreateEditor((editor) => {
20+
editor.updateOptions({
21+
suggest: {
22+
snippetsPreventQuickSuggestions: false
23+
}
24+
});
25+
});
26+
1327
function App(): React.ReactElement {
1428
const refMoInstance = useRef<InstanceService>();
1529
const [MyWorkbench, setMyWorkbench] = useState<React.ReactElement>();

0 commit comments

Comments
 (0)