Mathias Fussenegger
90616ae6ae
Restore stopped state if goto errors
...
Problem:
A debug adapter can respond to goto with an error - e.g. if attempting
to jump to a location where there is no code to execute.
If that happened, selecting another goto location was no longer possible
because the stopped state had been cleared.
Solution:
Restore stopped state if goto fails
2024-09-12 14:48:38 +02:00
Mathias Fussenegger
20a4859ebd
Add a usevisible
switchbuf option
...
Closes https://github.com/mfussenegger/nvim-dap/issues/1328
2024-09-05 17:29:05 +02:00
Bogdan
281a2e4cd1
Allow the uselast switchbuf variant to use buffers with dap_source_buf
set ( #1315 )
...
Should help with the scenario from:
https://github.com/mfussenegger/nvim-dap/issues/956#issuecomment-1584883229
2024-08-18 11:01:07 +02:00
Sewbacca
33b39732c5
Pass env variables from runInTerminal request to external terminal ( #1318 )
...
Fixes #1317
2024-08-18 10:59:25 +02:00
Mathias Fussenegger
2b428ff263
Always set startFrame in stackTrace request
...
Relates to https://github.com/mfussenegger/nvim-dap/discussions/869#discussioncomment-10058258
2024-08-09 14:41:44 +02:00
Antoine Bertin
7bf34e0917
Add utils.splitstr function ( #1276 )
...
Fixes #629 , #816 and #1267
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2024-08-09 14:24:24 +02:00
Mathias Fussenegger
9b81479813
Include frame name in "Source missing" info messages
2024-08-09 11:39:53 +02:00
Mathias Fussenegger
cef212e28f
Fix some type annotations (missing dap. prefix)
2024-08-09 11:34:15 +02:00
Mathias Fussenegger
6a12fe51ed
Change continue() to resume other session if focused session is not stopped
...
If you have multiple sessions `continue()` should resume an unfocused
session instead of telling the user that the current session is not
stopped at a breakpoint.
2024-08-09 11:04:03 +02:00
Kovács Ádám
0e889b8616
Improve error message for launch.json parse errors ( #1285 )
...
Instead of only showing a generic message that something is wrong with the
`launch.json` this changes the handling to propagate the error message returned
by the JSON decode function.
An example that produces an error:
```
:set ff=unix
:set bomb
```
Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
2024-08-09 10:50:07 +02:00
Mathias Fussenegger
b84e30402f
Add type annotations for setBreakoints; fix tests on nightly
2024-08-09 10:34:57 +02:00
Mathias Fussenegger
bc03b83c94
Extend type -> hl_group mapping with more types; Make case insensitive
2024-07-17 20:19:11 +02:00
Mathias Fussenegger
78f45e8545
Use SignColumn
for texthl in sign hl group definitions
2024-06-03 19:20:14 +02:00
Mathias Fussenegger
447be83aba
Set view context on expression widgets
...
Makes sure the close behavior of setVariable/setExpression works
2024-06-03 19:20:14 +02:00
Mathias Fussenegger
cb65f15eae
Add parent reference to variables
...
Simplifies the parent lookup for setVariable.
The parent lookup will also be necessary for data breakpoints
2024-06-03 19:20:14 +02:00
Mathias Fussenegger
8f57b4430c
Fix some more luals warnings
2024-06-03 19:20:14 +02:00
Mathias Fussenegger
edb1020bcf
Merge co_resume_schedule and co_resume
2024-06-03 19:20:14 +02:00
Mathias Fussenegger
b1d400ebb5
Remove signal_err
2024-06-03 19:20:14 +02:00
Mathias Fussenegger
eebde2c241
Move on_config hooks from providers to listeners
...
Fits a bit better and there may be other client generated events in the
future.
2024-06-01 12:32:50 +02:00
Mathias Fussenegger
1f609cbc48
Don't convert scope variables to dict with name as key
...
That was only used for a fallback case in the expression widget.
It's cheaper to do it there if needed instead of doing it all the time.
2024-06-01 12:23:03 +02:00
Mathias Fussenegger
0a5c5093e4
Use scopes from response without copy
2024-06-01 12:23:03 +02:00
Mathias Fussenegger
5823403923
Point to available adapters if config references missing adapter
2024-06-01 11:14:18 +02:00
Mathias Fussenegger
09b54e03d4
Use luarocks test --local
on CI
2024-05-31 19:01:17 +02:00
Mathias Fussenegger
b22b3f6819
Implement var placeholder replacement as on_config hook
2024-05-31 18:03:18 +02:00
Mathias Fussenegger
f2042a4cad
Drop support for thread result from config provider
...
Makes the implementation a bit simpler. Given that the function is
called from a coroutine it is still possible to use coroutine.running(),
coroutine.resume() and coroutine.yield() within it for async operations.
2024-05-31 18:03:18 +02:00
Mathias Fussenegger
ea8f6311b1
Add on_config hooks to dap.providers
...
Should solve https://github.com/mfussenegger/nvim-dap/issues/720
2024-05-31 18:03:18 +02:00
Mathias Fussenegger
d8d53cb80b
Hide _vim_exit_handler
2024-05-31 18:03:18 +02:00
Mathias Fussenegger
b4f744107f
Add more type annotations
2024-05-31 18:03:18 +02:00
Mathias Fussenegger
36e72ed2a6
Add dap. namespace to luacats class definitions
2024-05-30 16:10:25 +02:00
Mathias Fussenegger
54f891ae4c
Add config providers; always load .vscode/launch.json
...
- Introduces a dap.providers.configs table which plugins can extend to
add additional sources for dynamic configuration generation
- Implements the two built-in configuration sources as providers
- `.vscode/launch.json` files are now loaded automatically by one of
these providers. The entries from the file always display even if the
type doesn't match the current filetype. This gets rid of the
`type_to_filetypes` mapping requirements.
2024-05-30 15:46:53 +02:00
Mathias Fussenegger
5e2895a8d2
Add dap-eval:// buffer support
...
Acts as a scratchpad for expression evaluation or multi-line input for
the REPL
2024-05-30 12:42:41 +02:00
Mathias Fussenegger
ede7575620
Reuse session metatable
2024-05-30 12:42:41 +02:00
Mathias Fussenegger
5ba8ceace5
Add health check
2024-05-30 12:07:53 +02:00
Mathias Fussenegger
7b18c319b0
Provide feedback if item in variable tree has no children to expand
2024-05-30 11:17:51 +02:00
gh-liu
316f4edd1e
Add variable ${command:pickFile}
2024-05-30 11:16:52 +02:00
Mathias Fussenegger
abb238f631
Fix repl auto completion trigger regression
2024-05-28 19:43:19 +02:00
Mathias Fussenegger
922ebc75c2
Silence <c-x><c-o> auto completion trigger messages
2024-05-26 20:24:01 +02:00
Mathias Fussenegger
c65c163daa
Return dap.ABORT if pick_process is cancelled
2024-05-23 19:34:16 +02:00
Mathias Fussenegger
083b9f33a7
Set nowrap in repl and float windows
...
Seems to work better for variables where the `tostring` implementation
is long and repeats information also available in the structure display.
2024-05-23 19:11:11 +02:00
Mathias Fussenegger
884964dc7f
Handle paths relative to custom path in utils.pick_file
...
Should fix https://github.com/mfussenegger/nvim-dap/issues/1220
2024-05-23 15:08:18 +02:00
Mathias Fussenegger
cf8d6e2885
Add path option for utils.pick_file
2024-05-23 11:22:03 +02:00
Andreas Schneider
fa226c4125
Add utils.pick_file() ( #1190 )
...
This implements a file picker, to pick the file you want to execute with
the debugger.
Fixes #1130
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
2024-05-23 09:37:25 +02:00
Mathias Fussenegger
5a2f712186
Fix nvim 0.11 deprecation warnings
2024-05-16 17:21:43 +02:00
Mathias Fussenegger
e1330ec3b2
Tweak buffer settings for variable diff view; lower max_level to 1
...
10 levels can take a huge amount of time to load, and there's currently
no way to interrupt it.
modified=false and bufhidden=wipe should make it easier to get rid of
the buffers after being done viewing the diff.
2024-05-16 13:39:13 +02:00
Mathias Fussenegger
559d0bbdbc
Add type annotations & param validation for toggle_breakpoint
2024-05-14 17:31:22 +02:00
Mathias Fussenegger
615a1b2046
Close stdio handles after process exits
...
Some debug adapters don't like it if dap closes stdin eagerly.
An example is gdb: https://github.com/mfussenegger/nvim-dap/issues/1206
2024-05-10 12:22:19 +02:00
Mathias Fussenegger
6ae8a14828
Allow to configure max wait timeout for pipe adapter
...
5000ms can be too short.
See https://github.com/mfussenegger/nvim-dap/discussions/1147
2024-04-18 11:30:22 +02:00
Mathias Fussenegger
c1695e500c
Allow to override output event handler
2024-03-17 21:02:49 +01:00
Mathias Fussenegger
fc880e8205
Use async.run in event_stopped for error handler
2024-02-17 11:41:38 +01:00
Mathias Fussenegger
e48c8116ea
Try to fetch frames in frames widget if they're missing
2024-02-17 11:41:38 +01:00