Skip to content

Commit 586db24

Browse files
committed
Add configuration setting for multiline method arguments
1 parent e4e34d9 commit 586db24

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,11 @@
918918
"description": "Automatically compile an InterSystems file when saved in the editor.",
919919
"type": "boolean",
920920
"default": true
921+
},
922+
"objectscript.multilineMethodArgs": {
923+
"markdownDescription": "List method arguments on multiple lines, if the server supports it. **NOTE:** Only supported on IRIS 2019.1.2, 2020.1.1+, 2021.1.0+ and subsequent versions! On all other versions, this setting will have no effect.",
924+
"type": "boolean",
925+
"default": false
921926
}
922927
}
923928
},

src/api/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,13 +426,16 @@ export class AtelierAPI {
426426
// api v1+
427427
public getDoc(name: string, format?: string): Promise<Atelier.Response<Atelier.Document>> {
428428
let params = {};
429+
if (!format && config("multilineMethodArgs") && this._config.apiVersion >= 4) {
430+
format = "udl-multiline";
431+
}
429432
if (format) {
430433
params = {
431434
format,
432435
};
433436
}
434437
name = this.transformNameIfCsp(name);
435-
return this.request(1, "GET", `${this.ns}/doc/${name}`, params);
438+
return this.request(1, "GET", `${this.ns}/doc/${name}`, null, params);
436439
}
437440

438441
// api v1+

0 commit comments

Comments
 (0)