zls icon indicating copy to clipboard operation
zls copied to clipboard

No syntax checker for types

Open nsadeh opened this issue 3 years ago • 1 comments

I am just starting out with Zig getting the tools set up. Here is something I ran into:

Problem Descriptions The following code does not raise any errors in VSCode:

pub fn main() anyerror!void {
    const universe: i32 = "This doesn't work";
}

I get no syntax highlight, but of course this does not compile.

Setup

  • macOS 11.2.2
  • VSCode
  • Zig version: 0.8.0-dev.2133+ad33e3483
  • ZLS version fully configured from the README on this page both in ZLS server and VSCode
  • I get the following message load: [notice-main] zls initialized and [notice-main] Using zig lib path '/usr/local/bin/lib'

Notes I am quite sure ZLS and the extension is running properly because before I turned it on, there was no syntax highlighting, and when I got zls server to run properly and pointed the extension to run there the syntax highlighting for keywords appeared, though not for errors.

nsadeh avatar May 09 '21 21:05 nsadeh

Can you check that ZLS actually works? I've hit #200 on 11.5.2.

paulstelian97 avatar Sep 04 '21 17:09 paulstelian97

Specific case fixed by ast-check; seems like a local configuration issue.

SuperAuguste avatar Oct 26 '22 03:10 SuperAuguste