File tree Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Expand file tree Collapse file tree 2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import GObject from "gi://GObject";
44import { makeDropdownFlat , settings as global_settings } from "./util.js" ;
55import { setupRustProject } from "./langs/rust/rust.js" ;
66import { setupTypeScriptProject } from "./langs/typescript/typescript.js" ;
7- import { setupValaProject } from "./langs/vala/vala.js" ;
87
98export default function PanelCode ( {
109 builder,
@@ -56,10 +55,6 @@ export default function PanelCode({
5655 stack_code . visible_child_name = panel . language ;
5756 previewer . useInternal ( ) . catch ( console . error ) ;
5857
59- if ( panel . language . toLowerCase ( ) === "vala" ) {
60- setupValaProject ( file ) . catch ( console . error ) ;
61- }
62-
6358 if ( panel . language . toLowerCase ( ) === "rust" ) {
6459 setupRustProject ( file ) . catch ( console . error ) ;
6560 }
Original file line number Diff line number Diff 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" ) ,
You can’t perform that action at this time.
0 commit comments