Commit graph

179 commits

Author SHA1 Message Date
Ben Jackson
ba9cb2f6d3 WIP: First sort-of untested attempt at readmemory request 2021-06-09 11:25:38 +01:00
Ben Jackson
d43904eb57 Add basic VimspectorDebugInfo command 2021-05-15 17:55:01 +01:00
Ben Jackson
0c88cc8bad Fix traceback when opening popup in neovim with log visible
* We enter the popup window
* some log data is received, so we update the log buffer and jump to the
  log window to scroll it
* meanwhile, the WinLeave auto command on the popup window fires and
  closes the popup window
* Having scrolled the log window, we try to jump back to the popup
  window, which by now has been closed.

Fixes #390
2021-04-29 10:02:23 +01:00
Ben Jackson
13a5a1b947 Fix traceback when +python3 is not availble 2021-04-09 16:54:49 +01:00
Ben Jackson
1414f261a1 Documentation for hot code replace 2021-03-19 22:59:27 +00:00
Ben Jackson
a39017dd06 Fix actually sending terminateDebugee, and fix neovim 1-based index reporting 2021-03-19 18:43:45 +00:00
Ben Jackson
efc5c76866 Fix lints 2021-03-19 17:51:59 +00:00
Ben Jackson
154e727b96 Make confirm dialog take arbitrary keys
Confirm now takes the list of options, list of keys to select them and
the default value. Returned values are always a 1-based index into the
list (like SelectFromList) or -1 to mean esc/ctrl-c.

This uses a nice popup dialog in vim and a crappy input on neovim.
2021-03-19 17:51:59 +00:00
Ben Jackson
6b74e584d5 Create a messagebox-like interface in vim 2021-03-19 17:51:59 +00:00
Ben Jackson
85bb8594ab Allow forcing selection from the menu with <leader>F5 2021-03-19 17:51:59 +00:00
Ben Jackson
63fd3165fb Use popup for confirmations (note these have to be async) 2021-03-19 17:51:59 +00:00
Ben Jackson
6f88b400e1 Only disable mappings in the keyboard-version of the popup 2021-03-18 13:51:32 +00:00
Ben Jackson
a53d68f043 Add up and down frame mappings 2021-03-12 21:27:56 +00:00
Ben Jackson
d2b92b7ce5 Fix crash using STop function 2021-03-02 11:12:01 +00:00
Ben Jackson
804b499286 Allow setting the value via the api 2021-02-25 22:15:09 +00:00
Ben Jackson
49a9a4b367 Allow mappings which aren't special chars 2021-02-25 22:15:09 +00:00
Ben Jackson
f2d407256e Use expression completion for watch and set 2021-02-25 22:15:09 +00:00
Ben Jackson
ba83a59e88 TEst overriding the mappings 2021-02-25 22:15:09 +00:00
Ben Jackson
675a68c601 Make it work in neovim too 2021-02-25 22:15:09 +00:00
Ben Jackson
26452289a8 Allow overriding the variables/stack trace mappings in config 2021-02-25 22:15:09 +00:00
Ben Jackson
c2082cffae Support setting from the balloon 2021-02-25 22:15:09 +00:00
Ben Jackson
d8d6eb2286 Add ability to set a variable value
This works only for things which have known variablesReference, so
particularly currently only for scopes and theoretically for members.

I think this can work for watches too. will need to check.
2021-02-25 22:15:09 +00:00
Ben Jackson
f40ac5db23 Delay launching the python interpreter until needed 2021-02-25 21:24:40 +00:00
Ben Jackson
d8eb6a0463 Only prompt in 'interactive' contexts to avoid annoying questions 2021-02-24 18:00:08 +00:00
Ben Jackson
6fac220ee5 Disable mappings in the popup to ensure navigaion works 2021-02-23 09:42:57 +00:00
Ben Jackson
0810d7154c Fix syntax occasionally not working in popup, and custom vimrc crashing in neovim 2021-02-23 09:03:45 +00:00
Ben Jackson
476300f815 Fix errors resetting in neovim 2021-02-22 13:39:58 +00:00
Ben Jackson
0e0cc6d4ae Fix restart when using CodeLLDB
Fix restarts always getting stuck "Initializing" when using CodeLLDB.

When using the restart command we re-use the configuration dict as-is,
so always re-use the same TCP port for the lldb socket. Originally it
was thought this was due to a race condition, having the port still
open, but it's not.

When doing a restart, or reset, we shut down the server after we get the
response to the disconnect message. CodeLLDB then also sends a
'terminated' message.

Previously we were forcefully closing the socket before killing the app,
after we get the 'disconnect' response. This meant that the OS buffer
for the socket to localhost:<the port> still contained the terminated
message at the point that we force-closed the socket and killed the
server.

The result was that the firt messages read from the "new" socket to
locahost:<port> were the last messagse written by the previous process,
trikcing vimspector into thinking that the server terminated the process
(before responding to the initialize request).

ANyway, the solution is to ensure that we read all messages from the
previous instance before considering it done. This is done by killing
the server if there is one *first* and then trying to read any messages
from the socket until it closes (reads EOF).

The tricky part is for when we didn't start the server (i.e. in a
multi-session setup). Here we simply _have_ to close the socket because
we can't know when we've received all of the messages, and we shouldn't
expect to receive any 'terminated' events after 'disconnect'.
2021-02-22 12:09:01 +00:00
Ben Jackson
cc84e15932 Tidy up, refactor and fix some bugs 2021-02-21 17:01:41 +00:00
dsych
44711899cb moving stuff around 2021-02-21 17:01:41 +00:00
dsych
51d551fe52 replacing function calls with plug command 2021-02-21 17:01:41 +00:00
dsych
ae137ecdd0 removing old balloon code 2021-02-21 17:01:41 +00:00
dsych
639e89f5db fixing linting 2021-02-21 17:01:41 +00:00
dsych
0ff9dc5f9e making sure that select marks were set before attempting to extract text 2021-02-21 17:01:41 +00:00
dsych
4466fce20b fixing styling inside vim files 2021-02-21 17:01:41 +00:00
dsych
13102dc711 reverting back the highlight group 2021-02-21 17:01:41 +00:00
dsych
91bebc1826 adding a close button for keyboard triggered popup, since drag and resize are also enabled. removing wrap from border. 2021-02-21 17:01:41 +00:00
Ben Jackson
3239963893 Set the correct highlights in both popups in neovim 2021-02-21 17:01:41 +00:00
Ben Jackson
31e44548d3 Tidy up MouseFilter 2021-02-21 17:01:41 +00:00
Ben Jackson
894ca522d3 Use the popup callback rather than manually trying to do it 2021-02-21 17:01:41 +00:00
Ben Jackson
322b7e0a38 Enable mouse interraction for the both popups in vim 2021-02-21 17:01:41 +00:00
Ben Jackson
bc1146df3b Use normal highlighting for the popup as it's probably more readable (debatable?) 2021-02-21 17:01:41 +00:00
Ben Jackson
d2ed8a828c Use popup_filter_menu for the keyboard-popup rather than 100% our own 2021-02-21 17:01:41 +00:00
Ben Jackson
fccafd6739 FixUp: border characters - indicate that the corner can be dragged 2021-02-21 17:01:41 +00:00
Ben Jackson
64f2c8eb01 Use a fancy single line border in vim popup when we can 2021-02-21 17:01:41 +00:00
Ben Jackson
cb174c176d Disable wrapping long lines in neovim popup too 2021-02-21 17:01:41 +00:00
Ben Jackson
2d082cc923 Use a more generous maximum size for the popup (TODO: option for this ?) 2021-02-21 17:01:41 +00:00
dsych
0d703779dc evaluating select range 2021-02-21 17:01:41 +00:00
Ben Jackson
cfae062da1 Disable cursorLine for the hover-only popup 2021-02-21 17:01:41 +00:00
Ben Jackson
0895c5e829 Add 1 cell of padding to the x direction which makes the popup more readable 2021-02-21 17:01:41 +00:00