ziglang / sublime-zig-language

Zig language support for Sublime Text
MIT License
85 stars 25 forks source link

Symbol detection gives incorrect locations #64

Open TheGag96 opened 2 years ago

TheGag96 commented 2 years ago

Using Ctrl+R to search through symbols in a given file seems to yield not the actual definition site of a symbol, but just a random place where it happens to be mentioned. Try searching for Feature in target.zig to see what I mean.

Manuzor commented 2 years ago

It appears declarations aren't picked up as such. I believe what's missing is meta.struct.zig.

Here's target.zig as op described. image

Here's a struct definition in a cpp file. image

gwenzek commented 2 years ago

can you try #67 ?

TheGag96 commented 2 years ago

can you try #67 ?

With just a quick test, this seems to work a lot better!