Commit graph

17 commits

Author SHA1 Message Date
Ben Jackson
7d2770f3c4 Add vertical (i.e. narrow) layout
This puts the 3 utility windows at the top, horizontally split, with the
code view below.  The terminal window is drawn either vertically split
(if there's room) or horizontally split otherwise.  The output window
remains at tht bottom.

We add equivalent sizing options too, setting some defauts that roughly
work on my macbook pro.

We try to guess the best layout to use. In particular we go into
'narrow' mode if there are not enough horizonal columns to fit the
sidebar, code and at least the minimum terminal size. We also try to
move the terminal to be horizontally spit (i.e. vertically stacked) if
we can fit the max number of lines, but only the min number of columns.

This is all a little heuristic, but when testing it myself, it feels
good and tends to pick a good option by default. Users can always
customise the ui mode (g:vimspector_ui_mode and all the various specific
width options)
2021-03-10 23:44:45 +00:00
Ben Jackson
80985148e7 Add "run to cursor" support
We add a 'temporary' option to line breakpionts and try and clear any
temporary breakpionts on the line we end up stopping on. This might not
be art, but _probably_ works in almost all cases that matter.

it's a bit hacky the way we have to push the reason around, but we don't
know where we stopped until we actually get the stack trace response and
SetCurrentFrame

Move temporary breakpionts to match server response

Also delete any existing ones when adding a new one and add tests for
run-to-cursor.

Only continue after we successfully set the breakpoints. This makes it
work in go
2020-10-23 22:53:04 +01:00
Ben Jackson
bd09206caf While debugging, use the correct path for breakpoints 2020-09-27 22:47:22 +01:00
Ben Jackson
2ad1a3e502 Display a different sign when there's a breakpoint on the PC line
Vim only renders a single sign-per-line. If we have the PC _and_ a
breakpoint, we should make that clear. Do this using a vimspectorPCBP
sign which combines both vimspectorPC and vimspectorBP (sort of).

We can't (unfortuantely) render the breakpoint blob in a different
colour, but it's at least obvious when we toggle on the PC line.
2020-09-19 15:18:05 +01:00
Ben Jackson
c1b544fb3c Allow customisation of the signs
Too many plugins use the default priority of 10 so they race/chase.
Allow uses to configure the priorities and make sure that the defaults
are documented.
2020-09-01 13:56:12 +01:00
Ben Jackson
e885c95daa Put the cursor at the end of the buffer after evaluations 2020-07-18 18:14:39 +01:00
Ben Jackson
97f6dd29a6 Add some tests for expand/collapse variables; todo - fails on gdb/linux 2020-07-16 08:33:49 +01:00
Ben Jackson
abd8ba7d38 Stabilise some tests 2020-05-08 11:50:38 +01:00
Ben Jackson
7d046574cb Add tests for toggling breakpoint and inserting line 2019-12-14 18:03:34 +00:00
Ben Jackson
6f9fe0cd6f Increase timeout and yet more debug logging 2019-07-27 10:57:50 +01:00
Ben Jackson
17b85d2d72 Reset the actual vimspector, not a fresh one 2019-07-27 10:57:50 +01:00
Ben Jackson
7813f06dd1 May make the tests less flaky 2019-07-27 10:57:50 +01:00
Ben Jackson
4d484868f3 Wait for sign to be displayed 2019-07-27 10:57:50 +01:00
Ben Jackson
1e54e457d4 Finally fix breakpoint bugs 2019-07-27 10:57:50 +01:00
Ben Jackson
e6904acddd Fix some asserts 2019-07-27 10:57:50 +01:00
Ben Jackson
34df47fe35 Make reset reliable by waiting for it to finish 2019-07-27 10:57:50 +01:00
Ben Jackson
9fcfa13cc1 Common setup/cleardown 2019-07-27 10:57:50 +01:00