This is more of a collection of a few pain points in regards to the presentation and functionality related to variables.
Mostly a brain dump for now.
long text
The display of variables can be quite hard to read if it is a structure with a
very long string representation as you get something like:
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnngggggggggggggggggggggggggggggggggggggggggggggggg tttttttttttttttttttttttttttttttttttttttteeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxtttttttttttttttttttttttttttttttttttttttttttttttttttttt
property1: foo
property2: bar
property3: ..
[...]
Ideas:
repl could provide a way to only print the text (and treating \n as newline in that mode). E.g. a .e <expression>. .e for evaluate, which supports level specification .e0, .e1, ... The 0 level could mean only top-level text.
Trim long text by default
Formatters
Sometimes you stop at a breakpoint and view the contents of a variable and then want to create a test-case with that data. It would be cool if there were some way to control how the variable is formatted.
E.g. a "copy as Lua/JSON/Python/.."
Language specifics are out of scope for nvim-dap, but a (higher level?) extension point for it might be built-in.
Or recipes how to do it with the low level API.
If anyone has concrete examples of output they'd want to format in a certain way - please add them as comment. It could help coming up with an interface
Search in collapsed items
Sometimes you want to see if an item in a collection contains a particular item. It would be nice if there were some functionality to search within collapsed (=not yet resolved) items
E.g. if you have:
settings: ArrayList@50 size=50
And type /foo it could first use regular buffer text search, and then fallback to nvim-dap variable contents search.
Problem Statement
This is more of a collection of a few pain points in regards to the presentation and functionality related to variables.
Mostly a brain dump for now.
long text
The display of variables can be quite hard to read if it is a structure with a very long string representation as you get something like:
Ideas:
\n
as newline in that mode). E.g. a.e <expression>
..e
forevaluate
, which supports level specification.e0
,.e1
, ... The0
level could mean only top-level text.Formatters
Sometimes you stop at a breakpoint and view the contents of a variable and then want to create a test-case with that data. It would be cool if there were some way to control how the variable is formatted.
E.g. a "copy as Lua/JSON/Python/.." Language specifics are out of scope for nvim-dap, but a (higher level?) extension point for it might be built-in. Or recipes how to do it with the low level API.
If anyone has concrete examples of output they'd want to format in a certain way - please add them as comment. It could help coming up with an interface
Search in collapsed items
Sometimes you want to see if an item in a collection contains a particular item. It would be nice if there were some functionality to search within collapsed (=not yet resolved) items
E.g. if you have:
And type
/foo
it could first use regular buffer text search, and then fallback to nvim-dap variable contents search.