|
|
@ -9,6 +9,7 @@ import { solidityTokensProvider, solidityLanguageConfig } from './syntaxes/solid |
|
|
|
import { cairoTokensProvider, cairoLanguageConfig } from './syntaxes/cairo' |
|
|
|
import { cairoTokensProvider, cairoLanguageConfig } from './syntaxes/cairo' |
|
|
|
import { zokratesTokensProvider, zokratesLanguageConfig } from './syntaxes/zokrates' |
|
|
|
import { zokratesTokensProvider, zokratesLanguageConfig } from './syntaxes/zokrates' |
|
|
|
import { moveTokenProvider, moveLanguageConfig } from './syntaxes/move' |
|
|
|
import { moveTokenProvider, moveLanguageConfig } from './syntaxes/move' |
|
|
|
|
|
|
|
import { tomlLanguageConfig, tomlTokenProvider } from './syntaxes/toml' |
|
|
|
import { monacoTypes } from '@remix-ui/editor' |
|
|
|
import { monacoTypes } from '@remix-ui/editor' |
|
|
|
import { loadTypes } from './web-types' |
|
|
|
import { loadTypes } from './web-types' |
|
|
|
import { retrieveNodesAtPosition } from './helpers/retrieveNodesAtPosition' |
|
|
|
import { retrieveNodesAtPosition } from './helpers/retrieveNodesAtPosition' |
|
|
@ -359,6 +360,8 @@ export const EditorUI = (props: EditorUIProps) => { |
|
|
|
monacoRef.current.editor.setModelLanguage(file.model, 'remix-move') |
|
|
|
monacoRef.current.editor.setModelLanguage(file.model, 'remix-move') |
|
|
|
} else if (file.language === 'circom') { |
|
|
|
} else if (file.language === 'circom') { |
|
|
|
monacoRef.current.editor.setModelLanguage(file.model, 'remix-circom') |
|
|
|
monacoRef.current.editor.setModelLanguage(file.model, 'remix-circom') |
|
|
|
|
|
|
|
} else if (file.language === 'toml') { |
|
|
|
|
|
|
|
monacoRef.current.editor.setModelLanguage(file.model, 'remix-toml') |
|
|
|
} |
|
|
|
} |
|
|
|
}, [props.currentFile, props.isDiff]) |
|
|
|
}, [props.currentFile, props.isDiff]) |
|
|
|
|
|
|
|
|
|
|
@ -911,6 +914,7 @@ export const EditorUI = (props: EditorUIProps) => { |
|
|
|
monacoRef.current.languages.register({ id: 'remix-zokrates' }) |
|
|
|
monacoRef.current.languages.register({ id: 'remix-zokrates' }) |
|
|
|
monacoRef.current.languages.register({ id: 'remix-move' }) |
|
|
|
monacoRef.current.languages.register({ id: 'remix-move' }) |
|
|
|
monacoRef.current.languages.register({ id: 'remix-circom' }) |
|
|
|
monacoRef.current.languages.register({ id: 'remix-circom' }) |
|
|
|
|
|
|
|
monacoRef.current.languages.register({ id: 'remix-toml' }) |
|
|
|
|
|
|
|
|
|
|
|
// Allow JSON schema requests
|
|
|
|
// Allow JSON schema requests
|
|
|
|
monacoRef.current.languages.json.jsonDefaults.setDiagnosticsOptions({ enableSchemaRequest: true }) |
|
|
|
monacoRef.current.languages.json.jsonDefaults.setDiagnosticsOptions({ enableSchemaRequest: true }) |
|
|
@ -931,6 +935,9 @@ export const EditorUI = (props: EditorUIProps) => { |
|
|
|
monacoRef.current.languages.setMonarchTokensProvider('remix-circom', circomTokensProvider as any) |
|
|
|
monacoRef.current.languages.setMonarchTokensProvider('remix-circom', circomTokensProvider as any) |
|
|
|
monacoRef.current.languages.setLanguageConfiguration('remix-circom', circomLanguageConfig(monacoRef.current) as any) |
|
|
|
monacoRef.current.languages.setLanguageConfiguration('remix-circom', circomLanguageConfig(monacoRef.current) as any) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
monacoRef.current.languages.setMonarchTokensProvider('remix-toml', tomlTokenProvider as any) |
|
|
|
|
|
|
|
monacoRef.current.languages.setLanguageConfiguration('remix-toml', tomlLanguageConfig as any) |
|
|
|
|
|
|
|
|
|
|
|
monacoRef.current.languages.registerDefinitionProvider('remix-solidity', new RemixDefinitionProvider(props, monaco)) |
|
|
|
monacoRef.current.languages.registerDefinitionProvider('remix-solidity', new RemixDefinitionProvider(props, monaco)) |
|
|
|
monacoRef.current.languages.registerDocumentHighlightProvider('remix-solidity', new RemixHighLightProvider(props, monaco)) |
|
|
|
monacoRef.current.languages.registerDocumentHighlightProvider('remix-solidity', new RemixHighLightProvider(props, monaco)) |
|
|
|
monacoRef.current.languages.registerReferenceProvider('remix-solidity', new RemixReferenceProvider(props, monaco)) |
|
|
|
monacoRef.current.languages.registerReferenceProvider('remix-solidity', new RemixReferenceProvider(props, monaco)) |
|
|
|