mrcjkb / rustaceanvim

🦀 Supercharge your Rust experience in Neovim! A heavily modified fork of rust-tools.nvim
GNU General Public License v2.0
1.8k stars 69 forks source link

Better nvim-dap integration #145

Closed paulkre closed 10 months ago

paulkre commented 10 months ago

Feature description

Currently, it is possible to start a DAP debug session by running RustLsp debuggables. It would be great though if you could also use the default way of launching debug sessions by running require("dap").continue(). This would require that this plugin registers the debuggables directly inside nvim-dap before require("dap").continue() is called.

Here is how nvim-jdtls achieves this:

require("jdtls.dap").setup_dap_main_class_configs {
  on_ready = function() require("dap").continue() end,
}

It would be amazing if rustaceanvim could also expose some function like setup_dap_main_class_configs.

mrcjkb commented 10 months ago

Hey :wave:

Sounds like a good idea. Thanks for requesting!

mrcjkb commented 10 months ago

It kind of works.

Sometimes it doesn't seem to load the configurations on the first startup (but it does when reopening the file). I think this is likely because rust-analyzer takes a very long time to initialize...