Ada, Bash lsp tests passing
This commit is contained in:
parent
423cf8eea7
commit
41cafcd832
|
@ -68,7 +68,13 @@ export const langs: { [key: string]: LangConfig } = {
|
||||||
main: "main.adb",
|
main: "main.adb",
|
||||||
compile: "x86_64-linux-gnu-gnatmake-9 main.adb",
|
compile: "x86_64-linux-gnu-gnatmake-9 main.adb",
|
||||||
run: "./main",
|
run: "./main",
|
||||||
lsp: { start: "ada_language_server" },
|
lsp: {
|
||||||
|
start: "ada_language_server",
|
||||||
|
code: `
|
||||||
|
Ada.IO`,
|
||||||
|
after: `);`,
|
||||||
|
item: "IO_Exceptions",
|
||||||
|
},
|
||||||
template: `with Ada.Text_IO;
|
template: `with Ada.Text_IO;
|
||||||
|
|
||||||
procedure Main is
|
procedure Main is
|
||||||
|
@ -155,7 +161,11 @@ implement main0 () = ()
|
||||||
main: "main.bash",
|
main: "main.bash",
|
||||||
run: "bash --rcfile main.bash",
|
run: "bash --rcfile main.bash",
|
||||||
scope: { code: `x="$(expr 123 \\* 234)"`, input: `echo "$x"` },
|
scope: { code: `x="$(expr 123 \\* 234)"`, input: `echo "$x"` },
|
||||||
lsp: { start: "bash-language-server start" },
|
lsp: {
|
||||||
|
start: "bash-language-server start",
|
||||||
|
code: "read",
|
||||||
|
item: "readonly",
|
||||||
|
},
|
||||||
template: `echo "Hello, world!"
|
template: `echo "Hello, world!"
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
|
|
@ -246,7 +246,7 @@ class Test {
|
||||||
const after = this.config.lsp!.after;
|
const after = this.config.lsp!.after;
|
||||||
const item = this.config.lsp!.item!; // FIXME
|
const item = this.config.lsp!.item!; // FIXME
|
||||||
const idx = after
|
const idx = after
|
||||||
? this.config.template.indexOf(after)
|
? this.config.template.indexOf(after) + after.length
|
||||||
: this.config.template.length;
|
: this.config.template.length;
|
||||||
const code =
|
const code =
|
||||||
this.config.template.slice(0, idx) +
|
this.config.template.slice(0, idx) +
|
||||||
|
@ -522,7 +522,7 @@ class Test {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else if (msg.output.id === "ecdb8a55-f755-4553-ae8e-91d6ebbc2045") {
|
} else if (msg.output.id === "ecdb8a55-f755-4553-ae8e-91d6ebbc2045") {
|
||||||
return msg.output.result.items;
|
return msg.output.result.items || msg.output.result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue