zls icon indicating copy to clipboard operation
zls copied to clipboard

watch for filesystem events on imported files

Open Techatrix opened this issue 11 months ago • 1 comments

Zig Version

0.14.0-dev.365+6a16b27

ZLS Version

0.14.0-dev.2802+257054a14

Client / Code Editor / Extensions

VSCodium 1.94.2 with vscode-zig v0.6.4

Steps to Reproduce and Observed Behavior

  1. create the following two files on disk
  2. open root.zig in the editor (don't open mod.zig)
  3. request for completions in root.zig which will show Hello 👍
  4. edit mod.zig in a different editor instance, change Hello to World.
  5. request for completions in root.zig which will still show Hello 👎
/// root.zig
const mod = @import("mod.zig");
test {
    mod.<request code completions here>
}
/// mod.zig
pub const Hello = struct {};

Expected Behavior

Show World as the completion item.

ZLS should use workspace/didChangeWatchedFiles to be notified about changed files.

Relevant log output


Techatrix avatar Jan 31 '25 18:01 Techatrix

Thanks, for the record I'm the one who brought it up on Discord, I'm happy to help with extra diagnostics etc. if needed.

I found this with neovim v0.10.3 AppImage running on Debian 12.

(Although I see that @Techatrix has already done a great job with the report :) )

AloisMahdal avatar Jan 31 '25 18:01 AloisMahdal