zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.85k stars 3.15k forks source link

Go: Outline view shows wrong indentation #14497

Open DragonDev1906 opened 4 months ago

DragonDev1906 commented 4 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

As shown in the screenshot the outliner (Ctrl+Shift+O and Ctrl+Shift+B) wrongfully indent types that share the same type keyword.

This doesn't happen with var or const (see screenshot).

Example code

type A struct{}
type B struct{}
type C struct{}
type D struct{}
type E struct{}

type (
    F struct{}
    G struct{}
    H struct{}
    I struct{}
    J struct{}
    K struct{}
)

Environment

Zed: v0.143.7 (Zed) OS: Linux X11 arch unknown Memory: 31 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

2024-07-15-163822_614x476_scrot 2024-07-15-163540_1468x568_scrot 2024-07-15-164154_592x730_scrot

If applicable, attach your Zed.log file to this issue.

No response

JosephTLyons commented 4 months ago

cc @SomeoneToIgnore