zls
zls copied to clipboard
A language server for Zig supporting developers with features like autocomplete and goto definition
I've attempted to add a new code actions that would automatically sort your `@import`s in #881 but I never got around to finishing it and it started rot away. If...
### Zig Version 0.12.0-dev.1591+3fc6a2f11 ### Zig Language Server Version 0.12.0-dev.228+aa9fc0c ### Steps to Reproduce ```zig fn foo(comptime T: type, in: union(enum) { a: T, b: T }) void { switch...
### Zig Version 0.12.0-dev.1369+a09ba455c ### Zig Language Server Version 0.12.0-dev.228+aa9fc0c ### Steps to Reproduce ```zig @int() // Type F and complete @intFromBool @intF() ``` ### Expected Behavior ```zig @intFromBool() ```...
Related to https://github.com/zigtools/zls/issues/1567 and maybe #1338 Today when hovering over a struct type you get a rather useless: It would be nice if after the documentation (if any), the actual...
Let's assume https://github.com/zigtools/zls/pull/1476 is merged; ```zig pub fn main() void { var a = 1 } ``` Save once and it adds `;`, save again and it adds an unused...
```zig // If I go to definition on `File` - const File = @import("path/to/File.zig"); // ZLS should search `File.zig` for a `@This()` assigned to the same name. const File =...
### Zig Version 0.12.0-dev.1486+234693bcb ### Zig Language Server Version 0.12.0-dev.228+aa9fc0c ### Steps to Reproduce The inlay hints for the two `item`'s below shows as `Item` when they should be `*Item`...
Let's use the following example code: ```zig pub const Writer = struct { write: fn (bytes: []const u8) usize, pub fn write_all(self: *Writer, bytes: []const u8) void { var i...
It's extremely common for newcomers to come across code that looks like this and not know what `.{}` means: ```zig const foo = b.addStaticLibrary(.{ // ... }); ``` In some...
It currently is broken: 