AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.14k stars 232 forks source link

Rust debug error... #240

Closed duanyuluo closed 1 year ago

duanyuluo commented 1 year ago

:checkhealth report : https://gist.github.com/duanyuluo/e928d4672f7f31a1a185201e55810184

1) import pack.rust in community

2) add "codelldb" in mason.lua

Screenshot 2023-05-28 at 18 24 21

3) codelldb, rust-tool & rust-analyizer are all installed and worked finely.

Screenshot 2023-05-28 at 18 25 16

4) with cmd "rust hover action" to start debug ... that's error...

Screenshot 2023-05-28 at 18 21 34

Do I need to config Dap provider and configuration by myself? ( I have try it, but it's so complex...)

luxus commented 1 year ago

u will break a lot of stuff if you add lsps like that. the code you post in the picture will overwrite everything. btw please use codeblocks instead of screenshots and codellb is already provided by the rust pack.. but maybe ur code is overwriting it. remove the code from the first screenshot

duanyuluo commented 1 year ago

u will break a lot of stuff if you add lsps like that. the code you post in the picture will overwrite everything. btw please use codeblocks instead of screenshots and codellb is already provided by the rust pack.. but maybe ur code is overwriting it. remove the code from the first screenshot

I have remove other lsp server and dap config. But this question is still exist. I can debug rust project by F5 F9, but this issue happen while I use :RustHoverAction -> debug, or :RustDebugable .

BTW, this issue is maybe same with https://github.com/simrat39/rust-tools.nvim/issues/244 My lua is so poor... I can't research and debug astronvim's source codes...

thanks a lot @luxus

luxus commented 1 year ago

Please remove the code from the first screenshot

luxus commented 1 year ago

@Uzaaft any idea?

duanyuluo commented 1 year ago

I have remove it. https://github.com/duanyuluo/dotfile/blob/master/nvim/plugins/mason.lua but this issue still exist...

duanyuluo commented 1 year ago

I only remain three pack: go rust python. (ruff_lsp could not install)

Uzaaft commented 1 year ago

rust debugging works fine for me currently. Are you sure that it's not rustrust-cfg.lua that fucks up things at your end?

duanyuluo commented 1 year ago

I will close this issue now. let me known how to modify rust-tool default mapping without disturbing debug :) Thank a lot @Uzaaft

duanyuluo commented 1 year ago
Screenshot 2023-05-29 at 00 52 39
Uzaaft commented 1 year ago

I believe the keys table in lazy.nvim allows you to do that.