Skip to content

Debug adapter protocol support #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 262 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
262 commits
Select commit Hold shift + click to select a range
541f7a0
Add attach command
dsseng Aug 13, 2021
9678df1
refactor server message handling
dsseng Aug 13, 2021
59d6b92
refactor response processing
dsseng Aug 13, 2021
d6de540
dispatch events in client
dsseng Aug 14, 2021
c72475b
client: handle events multiple times
dsseng Aug 14, 2021
09390be
dap-basic: handle output events
dsseng Aug 14, 2021
0777948
dap-basic: better output formatting
dsseng Aug 14, 2021
b3be6b2
dap-basic: parse stop event
dsseng Aug 14, 2021
cc650c7
types: capitalize ID in names
dsseng Aug 14, 2021
c549278
compat: remove seq from Response and Event
dsseng Aug 14, 2021
43c9eba
compat: remove missing caps
dsseng Aug 14, 2021
e388079
compat: add all possible debugger caps
dsseng Aug 14, 2021
d4c215b
compat: don't wait for launch and attach response
dsseng Aug 14, 2021
809990a
format
dsseng Aug 14, 2021
eb0605c
dap: create C example
dsseng Aug 14, 2021
e7f543f
format
dsseng Aug 14, 2021
f5b1655
format
dsseng Aug 14, 2021
2a62108
dap-lldb: adjust breakpoint position
dsseng Aug 14, 2021
4f2b8fb
dap-dlv: rename from dap-go
dsseng Aug 14, 2021
ae32159
Revert "compat: don't wait for launch and attach response"
dsseng Aug 14, 2021
f92fb96
working lldb example
dsseng Aug 14, 2021
36fb8d1
examples: make examples identical
dsseng Aug 14, 2021
279db98
refactor: use tagged enum for handling DAP payloads
dsseng Aug 15, 2021
6c0f7ea
examples: continue handling output events
dsseng Aug 15, 2021
b9797a7
client: support tcp_process transport
dsseng Aug 15, 2021
3f62799
Get cargo check to pass in the subcrate
archseer Aug 16, 2021
6225401
A request always needs to have a response, per spec (the body can be …
archseer Aug 16, 2021
2d1ae2e
dap: Split types off into types.rs
archseer Aug 16, 2021
3a9e1c3
Refactor types, add a Request trait
archseer Aug 16, 2021
184abdc
dap: Significantly simplify code using the Request trait
archseer Aug 16, 2021
8fbda0a
fix: Used the wrong type for variables
archseer Aug 16, 2021
54dc2f8
Fix example compilation
archseer Aug 16, 2021
0300dbd
Avoid cloning a request on send
archseer Aug 16, 2021
d39baa3
Start integrating into the editor's event loop
archseer Aug 16, 2021
2094ff1
Silence TCP client messages on stdout, log them in the future
archseer Aug 16, 2021
86102a6
wip
archseer Aug 17, 2021
8759dc7
Add Default to some structs
archseer Aug 19, 2021
94a1951
Work towards a breakpoint UI
archseer Aug 19, 2021
a54b09e
dap: Split out launch from init
archseer Aug 20, 2021
c4970c6
make CI green
dsseng Aug 20, 2021
e2c74d2
Add command to run debug target
dsseng Aug 20, 2021
9e22842
move debug command to keybinding
dsseng Aug 20, 2021
738e8a4
Unify init and launch commands
dsseng Aug 20, 2021
6458ede
Add stack pointer display when stopped
dsseng Aug 21, 2021
5f5b383
Fix clippy warnings
dsseng Aug 21, 2021
56bddb1
Highlight line number of stack pointer
dsseng Aug 21, 2021
7087558
Don't leave debugged programs running
dsseng Aug 21, 2021
3fc501c
Correctly display 1-based breakpoints
dsseng Aug 21, 2021
a938f5a
refactor: handle DAP events in editor main loop
dsseng Aug 21, 2021
bcab93c
Update editor window when stopped
dsseng Aug 21, 2021
5a06263
report status when target started or stopped
dsseng Aug 21, 2021
afeaba1
add rx dispatcher to examples
dsseng Aug 21, 2021
462c8a6
Show debugger output in the statusline
dsseng Aug 21, 2021
26dee49
Add command to detach debugger
dsseng Aug 21, 2021
6709b42
Drop and terminate debugger
dsseng Aug 21, 2021
66c035f
Continue command
dsseng Aug 21, 2021
5230a2b
Continue command in keymap
dsseng Aug 21, 2021
f3e47bf
Disable continuing when running
dsseng Aug 21, 2021
95ba4ff
Hide stack pointer when continued
dsseng Aug 21, 2021
cc66475
Add commands for variable introspection
dsseng Aug 22, 2021
89ad54a
Add variable type to output
dsseng Aug 22, 2021
91f2c60
Jump to stack pointer when stopped
dsseng Aug 22, 2021
a964cba
Extract handle_debugger_message, we should avoid bloating tokio::select!
archseer Aug 22, 2021
7233ab2
Merge branch 'debug' of https://github.com/sh7dm/helix into debug
dsseng Aug 22, 2021
2aee5f0
Style
dsseng Aug 22, 2021
2865883
Add more event types, simplify event decoding
archseer Aug 22, 2021
dfc70a1
dap: support stepIn, stepOut, next and pause commands
dsseng Aug 22, 2021
d93cd2a
editor: support stepIn, stepOut, next and pause commands
dsseng Aug 22, 2021
be9dc58
editor: mark target as running when continued
dsseng Aug 22, 2021
1321983
editor: go to pos where stack pointer is located
dsseng Aug 22, 2021
d0b0c9b
editor: select a range if stack pointer has an end
dsseng Aug 22, 2021
74102bf
examples: fix build
dsseng Aug 22, 2021
060a422
fix crash when pausing
dsseng Aug 22, 2021
838f699
Simplify variables display
dsseng Aug 22, 2021
3197c25
Add eval command
dsseng Aug 22, 2021
f247858
Support conditional breakpoints
dsseng Aug 22, 2021
53ee57f
clippy
dsseng Aug 22, 2021
b78f70e
show breakpoint condition in diagnostics
dsseng Aug 22, 2021
dabec2d
Fix line endings
dsseng Aug 22, 2021
c5b210d
Add debug-adapter field to languages.toml
dsseng Aug 23, 2021
f55a012
editor: add debug session config
dsseng Aug 23, 2021
839d210
Enable stdio transport via config
dsseng Aug 23, 2021
b6b99b2
config: minor fixes
dsseng Aug 23, 2021
802ef20
chore: bump helix-dap version to 0.4.1
dsseng Aug 23, 2021
56d00fa
Fix tests
dsseng Aug 23, 2021
e529f4e
add lldb debugger for C
dsseng Aug 23, 2021
b5b79e3
types: make some fields optional as in spec
dsseng Aug 23, 2021
09c994a
editor: drop telemetry output messages
dsseng Aug 23, 2021
c09b151
fix freeze with lldb terminated event
dsseng Aug 23, 2021
b3469df
add lldb for c++
dsseng Aug 23, 2021
3a5e044
languages: support debug for Rust with LLDB
dsseng Aug 23, 2021
ec599a1
Do not panic if entered unknown code via stack trace
dsseng Aug 23, 2021
5d3c69d
Support logpoints
dsseng Aug 24, 2021
c4085b4
Use saturating_sub for lenght
dsseng Aug 24, 2021
fdad7d6
Check capabilities for breakpoint config
dsseng Aug 24, 2021
2158366
Enable variable types in DAP config
dsseng Aug 24, 2021
34c6094
refactor
dsseng Aug 24, 2021
c463142
Create new debugger config format
dsseng Aug 24, 2021
774ab6f
Add new format configs for Rust and C/C++
dsseng Aug 24, 2021
0e77938
Format
dsseng Aug 24, 2021
1041a5b
Support launching configs by name
dsseng Aug 24, 2021
31212e1
Rename functions
dsseng Aug 24, 2021
b001008
Support templates in debug configurations
dsseng Aug 24, 2021
299da5a
Support attach request
dsseng Aug 24, 2021
235a84d
Remove shortcut for starting debug
dsseng Aug 24, 2021
8cc6d68
Autocomplete files for debug command
dsseng Aug 24, 2021
2c3e2b9
Workaround for debugging Go tests
dsseng Aug 24, 2021
326293c
only show variables' names and types
dsseng Aug 25, 2021
ba96f5d
Format Cargo.toml
dsseng Aug 25, 2021
4ee66b8
Support remote debug adapter
dsseng Aug 25, 2021
c7759a5
Merge remote-tracking branch 'origin/master' into debug
dsseng Aug 25, 2021
2ad2838
Fix tests
dsseng Aug 25, 2021
3b87fce
Print errors occurred in debug commands
dsseng Aug 25, 2021
890b51b
Paginated variables
dsseng Aug 28, 2021
5e4da09
Don't let picker be too narrow
dsseng Aug 28, 2021
8df6739
New way of starting debug sessions
dsseng Aug 28, 2021
e315394
Merge remote-tracking branch 'origin/master' into debug
dsseng Aug 28, 2021
ef155e6
Add filename autocomplete to template args
dsseng Aug 28, 2021
94901b8
Customized completion for template parameters
dsseng Aug 28, 2021
af657ef
Fix lints
dsseng Aug 28, 2021
2d42766
wip: refactor parameters in UI start
dsseng Aug 29, 2021
9d2f2a9
Support multiple arguments for debug configs
dsseng Aug 29, 2021
98fda6b
better completion
dsseng Aug 29, 2021
f53d841
Add extra annotations to completions
dsseng Aug 29, 2021
b426319
Defaults in completions, better schema
dsseng Aug 29, 2021
db7f693
More advanced completions
dsseng Aug 29, 2021
2a7e38a
helix-core doesn't need to import serde_json
archseer Aug 29, 2021
ee2ba74
Rename dap_in/_out to dap_step_in/_out
archseer Aug 29, 2021
d6ccc15
Extract dap commands into a separate file
archseer Aug 29, 2021
51328a4
dap: extract dap_pos_to_pos
archseer Aug 29, 2021
81f51c1
dap: continued: THis check is already done before the match statement
archseer Aug 29, 2021
4d24a43
dap: use smallvec! macro
archseer Aug 29, 2021
03b2d81
dap: better yet, use Selection::single..
archseer Aug 29, 2021
986828e
dap: Remap keys, match current thread behavior from dap-mode, switch-…
archseer Aug 29, 2021
2c7b754
dap: refactor frame handling
archseer Aug 30, 2021
0b0b1d8
dap: Stop comparing file paths per line number
archseer Aug 30, 2021
6265e19
compat: change lldb to lldb-vscode
dsseng Aug 30, 2021
5b20f60
Merge remote-tracking branch 'origin/master' into debug
dsseng Aug 31, 2021
e0180a4
find main thread automatically if thread stopped is not known
dsseng Sep 2, 2021
2c89107
Fix crash when stack trace not loaded
dsseng Sep 2, 2021
9c64650
force update of stack trace when stopped
dsseng Sep 2, 2021
4c410ee
Merge remote-tracking branch 'origin/master' into debug
archseer Sep 3, 2021
5b920c5
Refactor resume_application state handling
archseer Sep 3, 2021
27c1b3f
dap: Extract a thread_states map
archseer Sep 3, 2021
42f9718
dap: Extract thread_picker, make pause explicitly select a thread
archseer Sep 3, 2021
289303a
dap: small TODO
archseer Sep 3, 2021
b997d2c
dap: Allow setting breakpoints before starting the adapter
archseer Sep 3, 2021
7b61c63
Handle stderr
archseer Sep 3, 2021
c63ad60
dap: Allow switching between stack frames
archseer Sep 3, 2021
cf7237d
compat: make thread IDs signed
dsseng Sep 3, 2021
9939dbf
Fix clippy warnings
dsseng Sep 4, 2021
00cccdc
Don't show thread picker for single-threaded targets
dsseng Sep 4, 2021
9a1916e
show thread states in thread picker
dsseng Sep 4, 2021
cb31d20
mark thread as running when resumed
dsseng Sep 4, 2021
c6186ce
jump to selected stack frame
dsseng Sep 4, 2021
430c80f
Fix crash when trying to select (view) threads when debuggee is running
dsseng Sep 4, 2021
df0ea66
examples: ensure target stopped by waiting for enter from user
dsseng Sep 4, 2021
698583c
Support setting breakpoints with mouse
dsseng Sep 4, 2021
e36fc57
refactor breakpoint edit
dsseng Sep 4, 2021
1befbd0
Add command for editing breakpoint condition
dsseng Sep 4, 2021
3b0ec75
Support editing breakpoint condition with right click
dsseng Sep 5, 2021
7bdead5
Drop old commands
dsseng Sep 5, 2021
8a60904
Mouse command for editing logpoint
dsseng Sep 5, 2021
0e1e4ed
different display for conditional logpoints
dsseng Sep 5, 2021
bb26c58
Keybinding for editing log
dsseng Sep 5, 2021
b6c58ea
Support thread previews
dsseng Sep 5, 2021
2d35b7b
Normalize line in picker preview to avoid crash
dsseng Sep 5, 2021
0add0c5
Make conditional logpoints underlined
dsseng Sep 5, 2021
9b8c5bd
Remove redundant fetching of stack traces
dsseng Sep 5, 2021
bdd636d
Clean up import
dsseng Sep 5, 2021
c9cd06e
Fetch stack traces for all threads when debugger sets all_thread_stop…
dsseng Sep 5, 2021
507a1f8
Get breakpoint reports from debugger
dsseng Sep 6, 2021
413e477
lldb: use stdio transport by default
dsseng Sep 6, 2021
bf53aff
Merge branch 'master' into debug
dsseng Sep 25, 2021
0e51e5f
editor: support setExceptionBreakpoints
dsseng Sep 26, 2021
d943a51
editor: add Node.js debugger
dsseng Sep 26, 2021
814dcfa
fix lints
dsseng Sep 26, 2021
48cb81e
Merge branch 'master' into debug
dsseng Oct 9, 2021
bc0084d
fix command descriptions
dsseng Oct 9, 2021
0a6b600
Merge branch 'master' into debug
archseer Oct 17, 2021
ea59f77
Port over parsing improvements from the LSP
archseer Oct 17, 2021
83a8167
Invert core -> dap dependency
archseer Oct 17, 2021
bda05ec
Use a newtype for ThreadId
archseer Oct 17, 2021
d6e8a44
dap: Fix examples
archseer Oct 17, 2021
6aa9838
dap: support arrays as arguments
dsseng Oct 24, 2021
cde57da
lldb: add gdbserver connection template
dsseng Oct 24, 2021
f979bdc
Specify capacity on toggle_line_comments
archseer Nov 6, 2021
f2b709a
Merge branch 'master' into debug
archseer Nov 6, 2021
14a3502
dap: Move template selection into a picker
archseer Oct 17, 2021
09d8c13
dap: Enable sticky mode for the submode
archseer Oct 19, 2021
a5ea614
dap: Bump helix-core
archseer Nov 6, 2021
2e1aa5f
Fix compilation
archseer Nov 6, 2021
e2a23ac
If there is no live debugger, treat breakpoints as unverified
archseer Nov 6, 2021
64bb1f7
dap: Extract out variable rendering
archseer Nov 7, 2021
3b8d510
Make picker take the whole context, not just editor
archseer Nov 7, 2021
5938ab1
dap: Fully extract template parameter prompts
archseer Nov 7, 2021
fd9b826
dap: Inline empty completer
archseer Nov 7, 2021
9baddc8
dap: Get rid of excessive cloning
archseer Nov 7, 2021
155c608
dap: Drop examples
archseer Nov 7, 2021
5803de2
dap: Simplify more calls
archseer Nov 7, 2021
757babb
dap: Avoid cloning *entire* stack frames when picking a thread
archseer Nov 7, 2021
9dd17c4
dap: Avoid cloning old_breakpoints if we are immediately replacing them
archseer Nov 7, 2021
31b431b
dap: Remove Deref for DebuggerCapabilities
archseer Nov 7, 2021
2bd8a9b
dap: Consistently rename type as ty
archseer Nov 7, 2021
4f2a01c
dap: Error implements Display so we can format with {}
archseer Nov 7, 2021
6586808
dap: Simplify launch & start
archseer Nov 7, 2021
9963a56
dap: Minor simplifications
archseer Nov 7, 2021
3042ff3
dap: Clean up dap_start_impl, no need to clone arg keys
archseer Nov 7, 2021
c39d9f4
dap: Simplify debug_parameter_prompt
archseer Nov 7, 2021
09f5796
dap: Simplify get_breakpoint_at_current_line
archseer Nov 7, 2021
8b85903
wip
archseer Nov 8, 2021
d1854d8
Merge remote-tracking branch 'origin/master' into debug
archseer Nov 21, 2021
05d3ad4
dap: Remove an excess clone on enable_exceptions
archseer Nov 21, 2021
3b3c396
nix: Update to lld 13, drop flake-compat (was unused)
archseer Nov 22, 2021
5f329a2
dap: Modify breakpoints in place with no cloning
archseer Nov 22, 2021
0eadeab
dap: Remove the prompt line parameter, use insert_str instead
archseer Nov 22, 2021
b55ca8f
dap: Always edit breakpoints on the correct document
archseer Nov 22, 2021
28fd704
ui: Since diagnostics are sorted, we can use binary search
archseer Nov 22, 2021
177b6fc
cargo fmt
archseer Nov 22, 2021
85b4410
dap: Toggle breakpoints without changing selection, fix offset calc
archseer Nov 22, 2021
7257682
dap: Replace breakpoint when changed event comes through
archseer Nov 22, 2021
9ed930b
Merge remote-tracking branch 'origin/master' into debug
archseer Nov 30, 2021
3633f85
Pass editor into render_view & gutter, reducing the number of params
archseer Nov 30, 2021
8ffafb8
dap: Rewrite breakpoints so that there's a single set maintained
archseer Nov 30, 2021
30ac586
dap: Extract diagnostics gutter into gutters.rs
archseer Nov 30, 2021
d906911
dap: Prevent crashes on files with no name or breakpoints
archseer Nov 30, 2021
84e939e
Provide a single gutter component that does breakpoint || diagnostic
archseer Nov 30, 2021
96ae589
Remove another parameter from render_view
archseer Nov 30, 2021
b4fd314
These TODOs have been resolved
archseer Dec 1, 2021
dfd499f
dap: Highlight line of current stack frame
archseer Dec 1, 2021
ffc89e4
Mark some more TODOs as resolved
archseer Dec 1, 2021
573cb39
dap: Remove some unwraps
archseer Dec 2, 2021
54f8e5c
dap: Fix an off-by-one and move the function over to commands/dap
archseer Dec 2, 2021
de5e586
dap: Use cursor_line over cursor + char_to_line
archseer Dec 2, 2021
d14ca05
Simplify some cases that use return None to use ?
archseer Dec 2, 2021
0d73a4d
dap: console = internalConsole is actually not a lldb-vscode param
archseer Dec 3, 2021
2dbf966
dap: Start working on runInTerminal support
archseer Dec 3, 2021
032aaff
dap: Split call/request in the same way LSP does
archseer Dec 3, 2021
43fbb6d
Make dap_start non-blocking
archseer Dec 3, 2021
bcf70d8
dap: All of these calls don't need &mut
archseer Dec 3, 2021
5545f8e
dap: Add RunInTerminal reverse request, support replying to requests
archseer Dec 3, 2021
d5d1a9b
Apply suggestions from code review
archseer Dec 6, 2021
2b4de41
dap: Reply to RunInTerminal
archseer Dec 5, 2021
dc8df7b
Make thread_picker non-blocking
archseer Dec 5, 2021
bf8437d
clippy lint
archseer Dec 5, 2021
e98993d
dap: Fix an off-by-one error when jumping
archseer Dec 7, 2021
d8351d3
dap: Extract a macro that fetches a debugger or returns
archseer Dec 7, 2021
60c86ef
dap: Simplify a few more statements that could use the debugger macro
archseer Dec 8, 2021
dac317e
TODO
archseer Dec 8, 2021
df3b883
dap: Improve variables UI
archseer Dec 9, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ members = [
"helix-tui",
"helix-syntax",
"helix-lsp",
"helix-dap",
]

# Build helix-syntax in release mode to make the code path faster in development.
Expand Down
17 changes: 0 additions & 17 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.rustOverlay.follows = "rust-overlay";
};
flakeCompat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};

outputs = inputs@{ self, nixCargoIntegration, ... }:
Expand Down Expand Up @@ -63,7 +59,7 @@
'';
};
shell = common: prev: {
packages = prev.packages ++ (with common.pkgs; [ lld_12 lldb cargo-tarpaulin ]);
packages = prev.packages ++ (with common.pkgs; [ lld_13 lldb cargo-tarpaulin ]);
env = prev.env ++ [
{ name = "HELIX_RUNTIME"; eval = "$PWD/runtime"; }
{ name = "RUST_BACKTRACE"; value = "1"; }
Expand Down
6 changes: 2 additions & 4 deletions helix-core/src/indent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,7 @@ fn get_highest_syntax_node_at_bytepos(syntax: &Syntax, pos: usize) -> Option<Nod
let tree = syntax.tree();

// named_descendant
let mut node = match tree.root_node().descendant_for_byte_range(pos, pos) {
Some(node) => node,
None => return None,
};
let mut node = tree.root_node().descendant_for_byte_range(pos, pos)?;

while let Some(parent) = node.parent() {
if parent.start_byte() == node.start_byte() {
Expand Down Expand Up @@ -466,6 +463,7 @@ where
}),
indent_query: OnceCell::new(),
textobject_query: OnceCell::new(),
debugger: None,
}],
});

Expand Down
2 changes: 1 addition & 1 deletion helix-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ pub use {regex, tree_sitter};
pub use graphemes::RopeGraphemes;
pub use position::{coords_at_pos, pos_at_coords, visual_coords_at_pos, Position};
pub use selection::{Range, Selection};
pub use smallvec::SmallVec;
pub use smallvec::{smallvec, SmallVec};
pub use syntax::Syntax;

pub use diagnostic::Diagnostic;
Expand Down
56 changes: 56 additions & 0 deletions helix-core/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ pub struct LanguageConfiguration {
pub(crate) indent_query: OnceCell<Option<IndentQuery>>,
#[serde(skip)]
pub(crate) textobject_query: OnceCell<Option<TextObjectQuery>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub debugger: Option<DebugAdapterConfig>,
}

#[derive(Debug, Serialize, Deserialize)]
Expand All @@ -92,6 +94,60 @@ pub struct LanguageServerConfiguration {
pub args: Vec<String>,
}

#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
pub struct AdvancedCompletion {
pub name: Option<String>,
pub completion: Option<String>,
pub default: Option<String>,
}

#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case", untagged)]
pub enum DebugConfigCompletion {
Named(String),
Advanced(AdvancedCompletion),
}

#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(untagged)]
pub enum DebugArgumentValue {
String(String),
Array(Vec<String>),
Boolean(bool),
}

#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
pub struct DebugTemplate {
pub name: String,
pub request: String,
pub completion: Vec<DebugConfigCompletion>,
pub args: HashMap<String, DebugArgumentValue>,
}

#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "kebab-case")]
pub struct DebugAdapterConfig {
pub name: String,
pub transport: String,
#[serde(default)]
pub command: String,
#[serde(default)]
pub args: Vec<String>,
pub port_arg: Option<String>,
pub templates: Vec<DebugTemplate>,
#[serde(default)]
pub quirks: DebuggerQuirks,
}

// Different workarounds for adapters' differences
#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
pub struct DebuggerQuirks {
#[serde(default)]
pub absolute_paths: bool,
}

#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct IndentationConfiguration {
Expand Down
24 changes: 24 additions & 0 deletions helix-dap/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "helix-dap"
version = "0.5.0"
authors = ["Blaž Hrastnik <[email protected]>"]
edition = "2018"
license = "MPL-2.0"
description = "DAP client implementation for Helix project"
categories = ["editor"]
repository = "https://github.com/helix-editor/helix"
homepage = "https://helix-editor.com"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
helix-core = { version = "0.5", path = "../helix-core" }
anyhow = "1.0"
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "net", "sync"] }

[dev-dependencies]
fern = "0.6"
Loading