Zig NEWS

Discussion on: Zig Support for IntelliJ

Collapse
 
kristoff profile image
Loris Cro

Maybe you've already thought of this, but my main recommendation would be to make sure to integrate with zig fmt.

WRT syntax coloring etc, is there a specific reason to prefer writing a grammar for intelliJ over using ZLS? Do language servers work at all with intelliJ?

Collapse
 
marioariasc profile image
Mario Arias

I'll try to use zig fmt.

I only know about one plugin (Julia, IIRC) that is trying to integrate a language server for autocompletion.

Collapse
 
decoyrs profile image
Alexander

Language Servers don't work out of the box in IDEA and IDEA based parsers let you more control and optimizations for code processing in IDEA environment.
There are now multiple plugins for Zig language for IDEA, but they all stop at 2 problems - type resolution and project model integration.
Maybe I'm blind, but Zig Build doesn't have an option to spit out it's properties and dependency tree, making it really hard to extract any useful info about project configuration.

Collapse
 
kristoff profile image
Loris Cro

The command itself doesn't, but builds in Zig are expressed declaratively (by creating a build definition) and you can override the build runner. This way you could write a "gather info" runner that doesn't actually run the build commands but just outputs a serialized version of the build pipeline.

I don't have first hand experience doing that so you might want to talk with meghan and matt about this (the authors of zigmod and gyro, respectively).

Thread Thread
 
decoyrs profile image
Alexander

I originally started with Zig Discord where I've been told my only option was to parse the build code and interpret it, so I lost any interest pretty quickly, but if it's possible to tweak it's behaviour on the fly by overriding runner I might give it a second look, thank you!

Thread Thread
 
kristoff profile image
Loris Cro

Uh, if that's the case I'm sorry, you got bad information.