vim-node-inspect
vim-node-inspect copied to clipboard
Better support for displaying objects
It would be nice if objects would be displayed in a better way. For example:

As you can see, the object in variable a is displayed as A a foo: bar foofoo: Object in the Watches window.
It would be nice to have them displayed in a more readable way. At the moment the best I can do is to add a watch like JSON.stringify(a). But I would much rather have something like JSON.stringify(a, null, " "), but whenever I try it it gets converted into JSON.stringify(a, n\a.

I don't know what the capabilities or limitations of vim are, but it would be nice to be able to unfold objects like this:

Youre right its in the roadmap (Watches / Open/Close properties). I'm not familiar with any standard implementation for such component in (n)vim, it has to be created from scratch.
No idea, but maybe https://github.com/elzr/vim-json can help? It seems to have folding capabilities around JSON
Also, after more searching, i came across https://github.com/puremourning/vimspector but haven't tried it yet. It seems to have object expansion/folding in its screenshot UI. Maybe it would be helpful as well.
Thanks, I've also looked at these before in my research, they don't really fit unless doing some serious modifications. Note a component for displaying the variables must be dynamic - some properties might fold, some not (assume a multi level object, the debugger will not unfold all at once which might be too large). Also there might be some large lists which need to be folded in parts. I've decided to write my own, if it'll be nice decoupled I'll publish it as a stand alone.