#zls does not get notified about file changes (only on win11)

1 messages · Page 1 of 1 (latest)

signal cairn
#

Really enjoying my journey with Zig at the moment, but the LSP makes my life miserable.
I'm assuming it's a me problem and something obvious since I don't read anything about it anywhere.

The problem:
I'm working let's say in file A that imports file B.
I add a new function or struct (or change whatever) in file B.
When I go back to file A the LSP still is on the state of old file B and has no clue about the existence of these changes.

When I restart my LSP or the editor itself it works fine again.
I use 1:1 the exact same setup on all my linux machines and those have 0 problems. It's only my main desktop which has to run win11

My setup:

  • Zig 0.15.2 | ZLS: 0.15
  • NeoVim (lspconfig + zls + cmp)
  • VS Code (No extensions besides ziglang support + zls + zig extra)

What I tried:

  • Removing any artifact or cache connected to Zig
  • Doctor around in build.zig according to reddit (not sure what I exactly I tried tbh)
  • Fresh setup in a fresh win11 VM
delicate ivy
signal cairn
#

@delicate ivy Thanks for the link! I didn't check solved issues at all, my fault.

I'm trying to build zls from master right now to get the patch.
Does building zls master need a self-built zig (master) to build correctly? Using the latest 0.16 pre-built binary does throw errors for me tring to build zls master.

delicate ivy
signal cairn
#

Well, trying to apply the patch to 0.15.0 starts with a merge conflicts whom lead to what feels like an endless cycle of fix to break more.
I'll resort to my linux laptop for Zig until 0.16 release I guess.

Thanks for the help though

delicate ivy
#

the fix should be as simple as deleting the ':' from the switch condition

signal cairn
#

Mhh, that's weird. I tried that first, but that alone didn't fix it, that's why I assumed I may have to apply the entire commit (of the uri rework) that got merged.

Did I forget something?
I cloned the 0.15 tag, applied the quick fix from the issue and build zls. Then put the bin dir into my env variables and set a custom path to it in the extensions (image added).

signal cairn
#

Okay, now it works. Had to removed the cache folders and re-installed the extensions it-self again.
Thanks a lot @delicate ivy