-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add way to provide extra initCommands
#656
Conversation
Review ChecklistDoes this PR follow the Contribution Guidelines? Following is a partial checklist: Proper conventional commit scoping:
If applicable:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey 👋
Thanks for the PR.
Is something like this supported by the rust-analyzer VSCode plugin or by rust-analyzer?
If not, I'd prefer it be requested there first.
Adding it to the rustaceanvim config feels quite hacky. I'd potentially be open to a more general solution, in which rustaceanvim doesn't have to be concerned with which extra fields are added to the DAP configurations.
Hey there, sorry for the late reply, was quite busy with work. I wouldn't know of any way to configure this with |
No worries, I'm not in a rush 😄
I stopped using debuggers years ago, and only carried over the DAP features from rust-tools.nvim. vim.g.rustaceanvim = {
dap = {
configuration = {
-- ...
initCommands = {
"command script import ./lldb/fleet.py",
-- ...
},
},
},
} See |
I tried your suggestion, but this fails for me:
|
You need to set all non-optional fields in the Example: vim.g.rustaceanvim = {
dap = {
configuration = {
name = "Rust debug adapter",
type = "lldb", -- or "codelldb",
request = "launch",
initCommands = {
"command script import ./lldb/fleet.py",
-- ...
},
stopOnEntry = false,
},
},
} |
Pull request was closed
Hello,
first of all thanks for this great plugin, it's my daily driver for a long time one 🙏
I have a particular feature that I'm lacking or don't know how to achieve in
rustaceanvim
when it comes to debugging: I have a custom lldb init script in my repo (which adds some custom formatters) which I want to apply to every debuggable target there is (executables, nvim-dap targets & neotest debug targets), when using thecodelldb
adapter.AFAIK I can only provide
initCommands
in the.vscode/launch.json
, which works for executables, but not for the tests, right?My idea was let the user configure an optional command in its config, which gets appended to all other init commands of all targets. My user config now looks like this:
Maybe there is another already built in way how to solve this, comments very welcome (=