Open joined72 opened 10 months ago
To add Node Path autocomplete I think to following some simple steps:
If you need some help (as for write the JavaScript code for point # 2) simply let me know, I'll be very happy to can help. ;)
To customize the VsCode autocompletion try to use a coce like this:
function activate(context) { context.subscriptions.push(vscode.languages.registerCompletionItemProvider( { language: 'csharp' }, { provideCompletionItems(document, position, token, context) { const line = document.lineAt(position); const prefix = line.text.slice(0, position.character).trim(); if (prefix === 'GetNode') { return ['NodePath1', 'NodePath2', 'NodePath3'].map(keyword => { const completionItem = new vscode.CompletionItem(keyword); return completionItem; }); } } } )); }
PS: otherwise you can check how the old C# plugin implemented this features on Godot 3.x here... https://github.com/godotengine/godot-csharp-vscode
To add Node Path autocomplete I think to following some simple steps:
If you need some help (as for write the JavaScript code for point # 2) simply let me know, I'll be very happy to can help. ;)
To customize the VsCode autocompletion try to use a coce like this:
PS: otherwise you can check how the old C# plugin implemented this features on Godot 3.x here... https://github.com/godotengine/godot-csharp-vscode