Skip to content

Commit b66871f

Browse files
authored
Various improvements (#974)
1 parent 6a1dd63 commit b66871f

6 files changed

Lines changed: 14 additions & 19 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Among other things, Workbench comes with
1717
- JavaScript, Rust, Python and Vala support
1818
- Declarative user interface syntax
1919
- Autosave, sessions and projects
20-
- Code linter and formatter
20+
- Code diagnostics, completion and formatter
2121
- Terminal output
2222

2323
ℹ️ Workbench is made possible by Flatpak. Only Flathub Workbench is supported.

data/app.metainfo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<li>JavaScript, Rust, Python and Vala support</li>
2020
<li>Declarative user interface syntax</li>
2121
<li>Autosave, sessions and projects</li>
22-
<li>Code linter and formatter</li>
22+
<li>Code diagnostics, completion and formatter</li>
2323
<li>Terminal output</li>
2424
</ul>
2525
</description>

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli/main.js

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export async function main([action, ...args]) {
3131

3232
if (action === "ci") {
3333
const filenames = args;
34-
const success = await ci({ filenames, current_dir });
34+
const success = await ci({ filenames });
3535
return success ? 0 : 1;
3636
}
3737

@@ -43,12 +43,10 @@ export async function main([action, ...args]) {
4343
}
4444

4545
if (lang.id === "vala") {
46-
const api_file = (
47-
GLib.getenv("FLATPAK_ID")
48-
? Gio.File.new_for_path(pkg.pkgdatadir)
49-
: current_dir.resolve_relative_path("src/langs/vala")
50-
).get_child("workbench.vala");
51-
api_file.copy(
46+
const file_api = Gio.File.new_for_path(pkg.pkgdatadir).get_child(
47+
"workbench.vala",
48+
);
49+
file_api.copy(
5250
current_dir.get_child("workbench.vala"),
5351
Gio.FileCopyFlags.OVERWRITE,
5452
null,
@@ -122,7 +120,7 @@ async function checkFile({ lspc, file, lang, uri }) {
122120
}
123121
}
124122

125-
async function ci({ filenames, current_dir }) {
123+
async function ci({ filenames }) {
126124
for (const filename of filenames) {
127125
const demo_dir = Gio.File.new_for_path(filename);
128126

@@ -354,12 +352,10 @@ async function ci({ filenames, current_dir }) {
354352
const languageId = "vala";
355353
let version = 0;
356354

357-
const api_file = (
358-
GLib.getenv("FLATPAK_ID")
359-
? Gio.File.new_for_path(`/app/share/${GLib.getenv("FLATPAK_ID")}`)
360-
: current_dir.resolve_relative_path("src/langs/vala")
361-
).get_child("workbench.vala");
362-
api_file.copy(
355+
const file_api = Gio.File.new_for_path(pkg.pkgdatadir).get_child(
356+
"workbench.vala",
357+
);
358+
file_api.copy(
363359
demo_dir.get_child("workbench.vala"),
364360
Gio.FileCopyFlags.OVERWRITE,
365361
null,

src/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import "gi://GIRepository?version=2.0";
2-
import Gtk from "gi://Gtk";
2+
import Gtk from "gi://Gtk?version=4.0";
33
import Source from "gi://GtkSource";
44
import Adw from "gi://Adw";
55
import Vte from "gi://Vte";

0 commit comments

Comments
 (0)