-
-
Couldn't load subscription status.
- Fork 385
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Zig Version
0.15.1
ZLS Version
0.15.0
Client / Code Editor / Extensions
Visual Studio Code with extension vscode-zig
Steps to Reproduce and Observed Behavior
As shown in the following figure, it is impossible to go to the definition of pool.create() .

code:
const std = @import("std");
pub fn main() !void {
// .init() have no hover, and cannot "Go to Definition".
var pool: std.heap.MemoryPool(u64) = .init(std.heap.smp_allocator);
// .deinit() same as above
defer pool.deinit();
// All methods of MemoryPool have no hover, and cannot "Go to Definition".
const p = try pool.create();
pool.destroy(p);
}Expected Behavior
Instances or methods of MemoryPool have hover prompts and can "Go to Definition".
Changing the type definition of the pool to look like the sixth line can achieve the expected result.

Log Output
2025-08-25 20:45:32.880 [info] Starting ZLS 0.15.0 @ '/home/user/zig-x86_64-linux-0.15.1/zls'
2025-08-25 20:45:32.880 [info] Log File: /home/user/.cache/zls/zls.log (info)
2025-08-25 20:45:32.880 [info] Client Info: Visual Studio Code (1.92.2)
2025-08-25 20:45:32.880 [info] added Workspace Folder: file:///home/user/Desktop/test_zls_memorypool
2025-08-25 20:45:32.998 [info] Set config option 'semantic_tokens' to "partial"
2025-08-25 20:45:32.998 [info] Set config option 'builtin_path' to "/home/user/.cache/zls/builtin.zig"
2025-08-25 20:45:32.998 [info] Set config option 'zig_lib_path' to "/home/user/zig-x86_64-linux-0.15.1/lib"
2025-08-25 20:45:32.998 [info] Set config option 'zig_exe_path' to "/home/user/zig-x86_64-linux-0.15.1/zig"
2025-08-25 20:45:32.999 [info] Set config option 'build_runner_path' to > "/home/user/.cache/zls/build_runner/cf46548b062a7e79e448e80c05616097/build_runner.zig"
2025-08-25 20:45:32.999 [info] Set config option 'global_cache_path' to "/home/user/.cache/zls"
2025-08-25 20:45:32.999 [info] trying to start Build-On-Save for 'file:///home/user/Desktop/test_zls_memorypool'milomg
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working