diff --git a/CHANGELOG.md b/CHANGELOG.md index dc8fd07..0aa9b8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +### 0.1.5 + +* Add function signature hint support +* Better syntax grammar checking +* Better hover hint message for workspace methods and signals + ### 0.1.4 * Add documentation support for builtin Symbols. diff --git a/README.md b/README.md index 6ed73e2..2e3493c 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,13 @@ The [Godot Tools](https://github.com/GodotExplorer/godot-tools) and the go to [e ## Release Notes +### 0.1.5 + +* Add function signature hint support +* Better syntax grammar checking +* Better hover hint message for workspace methods and signals + + ### 0.1.4 * Add documentation support for builtin Symbols. diff --git a/package.json b/package.json index 9c547eb..0f028ad 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Godot Tools", "icon": "icon.png", "description": "\"Tools for game development with godot game engine\"", - "version": "0.1.4", + "version": "0.1.5", "publisher": "geequlim", "engines": { "vscode": "^1.5.0" diff --git a/src/gdscript/symbolparser.ts b/src/gdscript/symbolparser.ts index bb944fe..4017335 100644 --- a/src/gdscript/symbolparser.ts +++ b/src/gdscript/symbolparser.ts @@ -76,15 +76,23 @@ class GDScriptSymbolParser { const signature = line.substring(line.indexOf("("), line.indexOf(")")+1); if(signature && signature.length >0) { script.signatures[key] = signature; - // console.log(key, signature); } } } let signalnames = getMatches(text, /signal\s+([_A-Za-z]+[_A-Za-z0-9]*)\s*\(/g, 1); const signals = findLineRanges(signalnames, "signal\\s+$X$\\s*\\("); - for (let key of Object.keys(signals)) - script.signals[key] = determRange(key, signals); + for (let key of Object.keys(signals)) { + let r: Range = determRange(key, signals); + script.signals[key] = r; + const line = lines[r.start.line]; + if(line.indexOf("(")!= -1 && line.indexOf(")")!=-1) { + const signature = line.substring(line.indexOf("("), line.indexOf(")")+1); + if(signature && signature.length >0) { + script.signatures[key] = signature; + } + } + } let varnames = getMatches(text, /var\s+([_A-Za-z]+[_A-Za-z0-9]*)\s*/g, 1); const vars = findLineRanges(varnames, "var\\s+$X$\\s*");