Skip to content

Commit 80b2e8e

Browse files
committed
add reference url to useEffect and clean up comments
1 parent 0b40206 commit 80b2e8e

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

client/modules/IDE/components/Editor/codemirror.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
import { useRef, useEffect } from 'react';
22
import { EditorView, lineNumbers as lineNumbersExt } from '@codemirror/view';
33
import { autocompletion, closeBrackets } from '@codemirror/autocomplete';
4-
5-
// TODO: Check what the v6 variants of these addons are.
6-
// import 'codemirror/addon/search/searchcursor';
7-
// import 'codemirror/addon/search/matchesonscrollbar';
8-
// import 'codemirror/addon/search/match-highlighter';
9-
// import 'codemirror/addon/search/jump-to-line';
10-
114
import { debounce } from 'lodash';
125
import { openSearchPanel } from '@codemirror/search';
136

@@ -147,7 +140,7 @@ export default function useCodeMirror({
147140
file,
148141
reconfigureEffect
149142
});
150-
}, [autocompleteHinter]);
143+
}, [autocompleteHinter, referenceBaseUrl]);
151144

152145
// Initializes the files as CodeMirror states.
153146
function initializeDocuments() {

client/modules/IDE/components/Editor/stateUtils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ import { highlightStyle } from './highlightStyle';
6161
import { errorDecorationStateField } from './consoleErrorDecoration';
6262

6363
// ----- TODOS -----
64-
// - JSON linter
6564
// - shader syntax highlighting
66-
// - add docstrings for all exported functions
6765

6866
/** Detects what mode the file is based on the name. */
6967
export function getFileMode(fileName) {
@@ -307,6 +305,7 @@ const extraKeymaps = [
307305
];
308306
const emmetKeymaps = [{ key: 'Tab', run: expandAbbreviation }];
309307

308+
/** Returns completion options configured for autocomplete. */
310309
export const createAutocompleteOptions = (referenceBaseUrl) => ({
311310
tooltipClass: () => 'CodeMirror-hints',
312311
closeOnBlur: false,

0 commit comments

Comments
 (0)