add globals

pull/5370/head
filip mertens 1 year ago committed by Aniket
parent d5425283df
commit db6752c455
  1. 14
      libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts

@ -521,6 +521,20 @@ export function GetGlobalVariable(range: monacoTypes.IRange, monaco): monacoType
export function GetGlobalFunctions(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] { export function GetGlobalFunctions(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] {
return [ return [
{
label: 'fallback',
kind: monaco.languages.CompletionItemKind.Function,
insertText: 'fallback() ${1:external} ${2:payable} { }',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
},
{
label: 'receive',
kind: monaco.languages.CompletionItemKind.Function,
insertText: 'receive() ${1:external} ${2:payable} { }',
insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,
range
},
{ {
detail: 'assert(bool condition): throws if the condition is not met - to be used for internal errors.', detail: 'assert(bool condition): throws if the condition is not met - to be used for internal errors.',
insertText: 'assert(${1:condition});', insertText: 'assert(${1:condition});',

Loading…
Cancel
Save