|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
The Asset LSP validates authored mesh asset paths in C++ files and completes mesh names from glTF files. Use it in CLion through the LSP4IJ plugin.
| Feature | Scope |
|---|---|
| Diagnostics | Reports invalid Asset::MeshPath and CREATE_MESH_ASSET_PATH(...) mesh names. |
| Completion | Completes the mesh name string from the referenced glTF file. |
| Quick fix | Replaces full project asset string literals with matching Engine::Core::Path::...() helper calls when a mapping exists. |
The server runs over standard input and output. CLion starts the process when a mapped C++ file opens.
Build the server with the asset-lsp CMake build preset:
The preset uses x64-Release-fast-tracy, which enables ENABLE_ASSET_LSP and writes the executable to:
Run the server only through an LSP client. It waits for JSON-RPC messages on standard input.
Install the LSP4IJ plugin before configuring the server.
Create the Asset LSP server:
The executable path inside the checkout is:
Use CLion's file picker for the command field if LSP4IJ asks for an absolute executable path.
The repository includes .lsp4ij/lsp4ij.json with the same server definition. If CLion imports it, verify that the command entry points to your local asset-lsp executable.
Expected mappings:
Open a C++ file that contains a mesh asset reference:
Place the caret inside the mesh name string and trigger completion. The server reads mesh names from the referenced glTF file and returns matching names.
The same completion path works for CREATE_MESH_ASSET_PATH(...):
| Symptom | Check |
|---|---|
| CLion cannot start the server | Build cmake --build --preset asset-lsp and verify the command path. |
| No diagnostics appear | Confirm that the file extension matches the LSP4IJ mappings. |
| No mesh completion appears | Confirm that the path expression resolves to an existing glTF file. |
| Errors | Check $HOME/asset-lsp.log. |
The server uses the CLion workspace root to resolve project-relative asset paths. Open the repository root as the CLion project.