symbols-outline.nvim icon indicating copy to clipboard operation
symbols-outline.nvim copied to clipboard

feat: Merge jsx symbols into lsp tree

Open mxsdev opened this issue 3 years ago • 5 comments
trafficstars

Addresses #153.

The idea is to first deeply sort the jsx and lsp trees, then merge the two by iterating through the symbols in order of symbol start position, deeply reconstructing the tree as we iterate.

mxsdev avatar Sep 15 '22 02:09 mxsdev

=== RESOLVED ===

I tried out your fork (and confirmed packer has the correct commit at ddc379b) but I can't seem to get it working in JSX or TSX, it still just shows the symbols for the JSX markup and not local variables defined before the function component return.

Not sure what debug output you might need, but let me know and I can comment it here. I'm on nvim nightly.

CallumHoward avatar Sep 23 '22 00:09 CallumHoward

Not sure what debug output you might need

Can you send an example jsx file where this happens?

mxsdev avatar Sep 23 '22 03:09 mxsdev

https://gist.github.com/CallumHoward/07fc4604443363d6e917d0b324998b97

Screen Shot 2022-09-23 at 4 55 11 pm

I've got nvim-navic going in the WinBar too, so the LSP server is returning symbols

CallumHoward avatar Sep 23 '22 06:09 CallumHoward

@CallumHoward Screen Shot 2022-09-23 at 10 31 47 AM I am not able to reproduce. Are you absolutely sure you have the PR loaded? You can check by adding a print statement somewhere like in this function.

mxsdev avatar Sep 23 '22 15:09 mxsdev

Ah yes, it's my mistake, I was on master, not on merge-jsx-tree. Sorry for the trouble, it works great!

CallumHoward avatar Sep 24 '22 08:09 CallumHoward

it works for me, thanks for your contribution. well done

ericzwong avatar Nov 15 '22 15:11 ericzwong

Anything missing to get this merged? A very needed feature.

TheodorRene avatar Dec 16 '22 11:12 TheodorRene

@TheodorRene

It looks like @simrat39 is not be actively maintaining this project anymore (which is understandable - they are a student!) Not sure what that means for the future of this project though :(

mxsdev avatar Dec 19 '22 17:12 mxsdev

I'm having the same issue.

geralfonso avatar Dec 19 '22 19:12 geralfonso

@TheodorRene

It looks like @simrat39 is not be actively maintaining this project anymore (which is understandable - they are a student!) Not sure what that means for the future of this project though :(

Very understandable. Anyone know a good alternative, or maintained fork?

TheodorRene avatar Dec 20 '22 07:12 TheodorRene

I'm sorry, I was super busy with stuff, but I should be back now, so I'll look into it

simrat39 avatar Jan 25 '23 22:01 simrat39