Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watch for filesystem events on imported files #2160

Open
Techatrix opened this issue Jan 31, 2025 · 1 comment
Open

watch for filesystem events on imported files #2160

Techatrix opened this issue Jan 31, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Techatrix
Copy link
Member

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 Techatrix added the bug Something isn't working label Jan 31, 2025
@AloisMahdal
Copy link

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 :) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants