Skip to content

Commit 7172d06

Browse files
committed
vala: Setup Vala project before starting the language server
Closes #913
1 parent 0672cbb commit 7172d06

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/langs/vala/vala.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@ export function setup({ document }) {
99

1010
const { file, buffer, code_view } = document;
1111

12-
const api_file = Gio.File.new_for_path(pkg.pkgdatadir).get_child(
13-
"workbench.vala",
14-
);
15-
api_file.copy(
16-
file.get_parent().get_child("workbench.vala"),
17-
Gio.FileCopyFlags.OVERWRITE,
18-
null,
19-
null,
20-
);
12+
// VLS needs the project to be already setup once it starts,
13+
// otherwise it won't pick it up later.
14+
setupValaProject(file.get_parent()).catch(console.error);
2115

2216
const lspc = createLSPClient({
2317
lang: getLanguage("vala"),

0 commit comments

Comments
 (0)