ZIm/crates/languages/src/tsx
Michael Sloan b564b1d5d0
outline: Fix nesting in multi-name declarations in Go and C++ (#36076)
An alternative might be to adjust the logic to not nest items when their
ranges are the same, but then clicking them doesn't work properly /
moving the cursor does not change which is selected. This could probably
be made to work with some extra logic there, but it seems overkill.

The downside of fixing it at the query level is that other parts of the
declaration are not inside the item range. This seems to be fine for
single line declarations - the nearest outline item is highlighted.
However, if a part of the declaration is not included in an item range
and is on its own line, then no outline item is highlighted.

Release Notes:

- Outline Panel: Fixed nesting of var and field declarations with
multiple identifiers in Go and C++

C++ before:

<img width="743" height="227" alt="image"
src="https://github.com/user-attachments/assets/af1a1d76-ecdc-4999-ae9c-95591726ccca"
/>

C++ after:

<img width="795" height="250" alt="image"
src="https://github.com/user-attachments/assets/49667ed3-e088-48b3-a9f0-6a119b5e7648"
/>

Go before:

<img width="859" height="306" alt="image"
src="https://github.com/user-attachments/assets/ecc7530a-ca16-4f37-b8d1-60687f178b12"
/>

Go after:

<img width="900" height="334" alt="image"
src="https://github.com/user-attachments/assets/d741cfb0-59e5-4d27-bd6a-f422204dc972"
/>
2025-08-12 21:08:19 +00:00
..
brackets.scm tsx: Insert newline between open and close tags on enter (#27618) 2025-03-27 19:15:12 +00:00
config.toml language: Update block_comment and documentation comment (#34861) 2025-07-23 20:38:52 +05:30
embedding.scm chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00
highlights-jsx.scm chore: Extract languages from zed crate (#8270) 2024-02-23 15:56:08 +01:00
highlights.scm Add spread operator to the @operator list for ECMAScript languages (#35360) 2025-08-08 01:58:26 +00:00
indents.scm Automatically indent JSX (#18816) 2024-10-10 15:15:12 +03:00
injections.scm Use standard injection.language and injection.content captures (#22268) 2025-01-07 18:17:49 +00:00
outline.scm outline: Fix nesting in multi-name declarations in Go and C++ (#36076) 2025-08-12 21:08:19 +00:00
overrides.scm languages: Fix string override to match just string_fragment part of template_string (#33997) 2025-07-07 11:45:54 +05:30
runnables.scm Apply TypeScript test improvements to tsx files (#32477) 2025-06-11 20:23:16 +02:00
textobjects.scm Add textobjects queries (#20924) 2024-12-03 10:37:01 -07:00