SmiteshP / nvim-navic

Simple winbar/statusline plugin that shows your current code context
Apache License 2.0
1.35k stars 49 forks source link

JSX support? #113

Closed adamsitar closed 1 year ago

adamsitar commented 1 year ago

Hi, I love the the navbuddy extension, but one problem I have is that the nodes displayed do not index anything inside the return part of the function

This is how navbuddy structure looks like: image

And this is how a different plugin (https://github.com/simrat39/symbols-outline.nvim) looks like: image

Looks like this plugin somehow indexes even the JSX, but not always, the behavior is not consistent - sometimes it works exactly like navic/navbuddy

I'm assuming that the navbuddy takes the data from navic, which gets them from the LSP - would it be possible to configure navic to index the JSX in the return part of the function also?

Thanks!

adamsitar commented 1 year ago

the PR that added the JSX functionality to the other plugin is this one: https://github.com/simrat39/symbols-outline.nvim/pull/144

if that helps

SmiteshP commented 1 year ago

There was a similar issue opened on navbuddy https://github.com/SmiteshP/nvim-navbuddy/issues/11 I don't want to add anything language specific as it becomes a maintenance overhead. Also looks like they are using treesitter to get this data, which another thing I want to avoid. Hope you understand.