Add omnifunc for prompt buffers
This synchronous completion can be used with any completion system
including built-in CTRL-X CTRL-O.
The filetype of the prompt buffers is set to VimspectorPrompt so that it
can be identified by completion systems. For example, this works well
with YCM:
let g:ycm_semantic_triggers = {
\ 'VimspectorPrompt': [ '.', '->', ':', '<' ]
\ }
This re-uses the OutputView code to run the installer script. Refactor
to remove connection from the base OutputView (and other places, it
wasn't used - only used after ConnectionUp).
This also consolidates the stdout and stderr buffers for running jobs.
The distinction was always arbitrary and probably an error, based on the
fact that they were separate in the APIs not based on usability.
This adds the following options, allowing the default sizes to be
overridden:
- g:vimspector_sidebar_width: Controls the width of the left utility
windows (variables, watches, stack trace)
- g:vimspector_bottombar_height: Controls the height of the output
window below the code window
The terminal is typically created as a vertical split of the code
window. The following control the sizing of the terminal window used
for debuggee input/output when using Vim's built-in terminal.
- g:vimspector_code_minwidth: Minimum number of columns to try and
maintain for the code window.
- g:vimspector_terminal_maxwidth: Maximum number of columns to use for
th terminal, when vertically splitting the code window.
- g:vimspector_terminal_minwidth: Minimum number of columns to use when
it is not possible to fit g:vimspector_terminal_maxwidth columns next
to the code window with g:vimspector_code_minwidth columns.
We were trying to avoid equalalways from changing the UI layout by
unsetting it and resetting it after changes. However, re-setting
equalalways actually resizes all the windows, so this never worked.
Instead we judiciously use rightbelow, leftabove, etc. and specify the
exact window sizes we want.
As a side-effect we make the terminal sizing a little more pleasant by
default, ensuring that it is no wider than 80 chars, and tries to use
any remianing vertical space after reserving 80 chars for the code
window.
This is the minimal required for a user to use conditional breakpoint -
we add an options dict to each breakpoint (line and function) and allow
the condition to be supplied. We add a plug mapping and a default
shortcut (<leader><F9>) to add one where we ask the user to enter the
condition and hit expression. This isn't great but it works.
We don't check the capabilities, so they would just be ignored if used
on a server that doesn't support them. We also ask for a hit expression
which most users won't understand so this isn't ideal either.
No tests yet.
Sometimes it can take quite a while to start up and initialise the debug
adapter. So we use popup/float to display the status as we start up and
shut down.
This increases minimum Vim version to 8.2, but that's been out for ages
now and I intend to agressively require latest/later vim/neovim
versions.
Debate rages about whether JSON should have comments. The specification
says it shouldn't but the author of JSON suggested that if you want to
use JSON for configuration, then pipe it through jsmin before parsing.
So that's what we do, using a tiny JSON minifier from
https://github.com/getify/JSON.minify/tree/pythonCloses#135