hedyhli / outline.nvim

Code outline sidebar powered by LSP. Significantly enhanced & refactored fork of symbols-outline.nvim.
https://sr.ht/~hedy/outline.nvim
MIT License
543 stars 15 forks source link

Feature Request: Recognise shorthand React fragments as "Fragment" in outlines #35

Closed gambonny closed 8 months ago

gambonny commented 9 months ago
Screenshot 2023-11-22 at 18 31 51

When using outline.nvim to view the structure of React components, shorthand React fragments (<>...</>) are currently labeled as unknown in the outline view. This can be confusing and does not accurately reflect the structure of the component.

Feature Request

I propose an enhancement to the outline detection logic to identify shorthand React fragments and label them as "Fragment" in the outline. This would improve the clarity and usefulness of the outline view for React developers who use this syntax.

hedyhli commented 9 months ago

Actually this looks like a bug, will get to it soon. Thanks!

hedyhli commented 8 months ago

This was due to tree-sitter/tree-sitter-javascript#227. It's fixed now, let me know if you're still having issues.

gambonny commented 8 months ago

@hedyhli it's working. Thanks a lot 👍.