Post B2HA4yl7ZspjRLYpN2 by Ciantic@twit.social
(DIR) More posts by Ciantic@twit.social
(DIR) Post #B2HA4yl7ZspjRLYpN2 by Ciantic@twit.social
2026-01-14T12:27:38Z
0 likes, 0 repeats
I periodically check zig, as I intermintely get frustrated with Rust and what it looks like. I really don't like how Rust's generics look. Another frustration is the borrow checker, usually I find the sweet path, but it still is (after years) pain to find the right solution.Right now I look at one struct that has this:layer_surface: Option<Rc<RefCell<EguiLayerSurface<Rc<RefCell<ProjectTimingsGui>>>>>>,Well, it works, but I now know I should refactor whole app 😀 #Rust #Zig
(DIR) Post #B2HA4zXgfJgJryHc4O by Ciantic@twit.social
2026-01-14T12:33:24Z
0 likes, 0 repeats
Everytime though I've tried #Zig, the problem is their IDE/LSP integration just fails. I really want to see errors, and have auto-complete working.They don't have same mentality as Rust towards LSP.I don't know but I think Rust benefited from few enthusiasts like matklad who worked LSP/IDE tooling for #Rust. He now writes also Zig, so if he helps them it could make Zig tooling better I think.
(DIR) Post #B2HA50NnXZMiTafEIK by tusharhero@mathstodon.xyz
2026-01-14T12:39:42Z
0 likes, 0 repeats
@Ciantic https://ziglang.org/learn/tools/zls seems to work fine for me. What is missing?
(DIR) Post #B2HBsisR07BCcGGUcK by Ciantic@twit.social
2026-01-14T13:00:26Z
0 likes, 0 repeats
@tusharhero I have to try it again, but last time I tried, it just refused to auto-complete winapi symbols. Then I asked around, people said it's impossible because there is like million of those...It's very easy with C but somehow Zig LSP hadn't figured out how to auto-complete / auto-import WM_USER and friends.
(DIR) Post #B2TMEevVQEdnuRrzLk by dunk@theforkiverse.com
2026-01-20T09:52:57Z
0 likes, 0 repeats
@tusharhero @Ciantic zls works fine for me 99% of the time but sometimes when working with c code I find the zls auto-completion not to be useful.. for example it seems to reference zig translante-c code in .zig_cache that has renamed fn parameters arg_123, arg_124, arg_125... and when they are all type (like int).. I endup needing grep the original source or look for docs to know how to use a fn... so ive just gotin in the habbit of writing small zig wrappers for all my c dependencies.