Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = ["crates/schema", "crates/syntax", "crates/analysis", "crates/server"]
members = ["crates/schema", "crates/syntax", "crates/analysis", "crates/w3d", "crates/server"]

[workspace.package]
version = "1.2.3"
Expand All @@ -13,6 +13,7 @@ rust-version = "1.75"
zerosyntax-schema = { path = "crates/schema" }
zerosyntax-syntax = { path = "crates/syntax" }
zerosyntax-analysis = { path = "crates/analysis" }
zerosyntax-w3d = { path = "crates/w3d" }

serde = { version = "1", features = ["derive"] }
serde_json = "1"
Expand All @@ -32,6 +33,9 @@ tokio = { version = "1", features = ["full"] }
ropey = "1"
dashmap = "6"
percent-encoding = "2"
base64 = "0.22"
glam = "0.27"
image = { version = "0.24.9", default-features = false, features = ["dds", "png", "tga"] }

# server (workspace indexing)
walkdir = "2"
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ VS Code extension with the server bundled.
- Optional indentation formatting, disabled by default so existing files are
never reformatted without your consent.
- Base-game and mod indexing for `map.ini` and `solo.ini`, including W3D model
and bone checks.
and bone checks. Selecting a `Model =` completion shows a textured W3D
thumbnail when the indexed asset is available, with configurable size and
zoom.

## Install the VS Code extension

Expand Down
3 changes: 2 additions & 1 deletion crates/analysis/src/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub enum CompletionKind {
EnumMember,
Value,
Reference,
W3dModel,
}

/// A single completion candidate.
Expand Down Expand Up @@ -418,7 +419,7 @@ fn model_asset_completions(
.model_names()
.map(|name| Completion {
label: name.to_string(),
kind: CompletionKind::Reference,
kind: CompletionKind::W3dModel,
detail: Some("W3D model".into()),
insert: None,
})
Expand Down
2 changes: 2 additions & 0 deletions crates/analysis/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3006,6 +3006,7 @@ End
vec![crate::index::FileAsset {
kind: AssetKind::Audio,
name: "Known.wav".into(),
uri: "file:///Known.wav".into(),
}],
);
let audio_only = codes(&index);
Expand All @@ -3016,6 +3017,7 @@ End
vec![crate::index::FileAsset {
kind: AssetKind::Texture,
name: "Known.dds".into(),
uri: "file:///Known.dds".into(),
}],
);
assert!(codes(&index).contains(&"unknown-texture"));
Expand Down
Loading