|
|
@ -49,7 +49,7 @@ export class RemixCompletionProvider implements languages.CompletionItemProvider |
|
|
|
console.log('expression elements', expressionElements) |
|
|
|
console.log('expression elements', expressionElements) |
|
|
|
let dotCompleted = false |
|
|
|
let dotCompleted = false |
|
|
|
if (expressionElements.length === 2) { |
|
|
|
if (expressionElements.length === 2) { |
|
|
|
let globalCompletion = getContextualAutoCompleteByGlobalVariable(lastNodeInExpression.name, range, this.monaco) |
|
|
|
const globalCompletion = getContextualAutoCompleteByGlobalVariable(lastNodeInExpression.name, range, this.monaco) |
|
|
|
if (globalCompletion) { |
|
|
|
if (globalCompletion) { |
|
|
|
dotCompleted = true |
|
|
|
dotCompleted = true |
|
|
|
suggestions = [...suggestions, ...globalCompletion] |
|
|
|
suggestions = [...suggestions, ...globalCompletion] |
|
|
@ -127,10 +127,10 @@ export class RemixCompletionProvider implements languages.CompletionItemProvider |
|
|
|
const declarationOf = await this.props.plugin.call('codeParser', 'declarationOf', nodeOfScope.typeName) |
|
|
|
const declarationOf = await this.props.plugin.call('codeParser', 'declarationOf', nodeOfScope.typeName) |
|
|
|
console.log('HAS DECLARATION OF', declarationOf) |
|
|
|
console.log('HAS DECLARATION OF', declarationOf) |
|
|
|
// nodes = [...nodes, ...declarationOf.nodes || declarationOf.members]
|
|
|
|
// nodes = [...nodes, ...declarationOf.nodes || declarationOf.members]
|
|
|
|
const baseContracts = await this.getlinearizedBaseContracts(declarationOf) |
|
|
|
//const baseContracts = await this.getlinearizedBaseContracts(declarationOf)
|
|
|
|
for (const baseContract of baseContracts) { |
|
|
|
//for (const baseContract of baseContracts) {
|
|
|
|
//nodes = [...nodes, ...baseContract.nodes]
|
|
|
|
//nodes = [...nodes, ...baseContract.nodes]
|
|
|
|
} |
|
|
|
//}
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -166,7 +166,7 @@ export class RemixCompletionProvider implements languages.CompletionItemProvider |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const completeParameters = async (parameters: any) => { |
|
|
|
const completeParameters = async (parameters: any) => { |
|
|
|
let localParam = ( parameters && parameters.parameters ) || (parameters) |
|
|
|
const localParam = ( parameters && parameters.parameters ) || (parameters) |
|
|
|
if (localParam) { |
|
|
|
if (localParam) { |
|
|
|
const params = [] |
|
|
|
const params = [] |
|
|
|
for (const key in localParam) { |
|
|
|
for (const key in localParam) { |
|
|
|