Skip to content
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

feat(pack): switch to codelldb for rust debugging #106

Merged
merged 4 commits into from
Mar 29, 2023

Conversation

ZackGlenn
Copy link
Contributor

Sets up rust-tools to debug with codelldb from Mason instead of lldb-vscode from the system.

Closes #84.

Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! One comment that needs to be fixed first

lua/astrocommunity/pack/rust/rust.lua Outdated Show resolved Hide resolved
@sjcobb2022
Copy link
Contributor

Just out of stylistic preference I would say that

local package_path = require("mason-registry").get_package("codelldb"):get_install_path()

Is "better practice" than accessing the actual index.

Not sure if anyone else has any thoughts on this. (@mehalter ??)

Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small Change regarding the mason API

lua/astrocommunity/pack/rust/rust.lua Outdated Show resolved Hide resolved
@mehalter mehalter changed the title feat!: switch to codelldb for rust debugging feat(pack): switch to codelldb for rust debugging Mar 29, 2023
Copy link
Member

@owittek owittek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

lua/astrocommunity/pack/rust/rust.lua Outdated Show resolved Hide resolved
Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for this!

@mehalter
Copy link
Member

Github actions are currently down so I'm just going to merge this anyway.

@mehalter mehalter merged commit 2005cf2 into AstroNvim:main Mar 29, 2023
@dsisnero
Copy link
Contributor

dsisnero commented Apr 3, 2023

How should this work on windows? - do we want
'extension/lldb/bin/liblldb.dll'

or

'extension\adapter\codelldb.dll'

for liblldb_path

@ZackGlenn
Copy link
Contributor Author

ZackGlenn commented Apr 3, 2023

How should this work on windows? - do we want 'extension/lldb/bin/liblldb.dll'

or

'extension\adapter\codelldb.dll'

for liblldb_path

I believe you would want extension\lldb\bin\liblldb.dll, but it's a moot point. Astronvim disables nvim-dap on windows because mason-nvim-dap doesn't support windows.

@dsisnero
Copy link
Contributor

dsisnero commented Apr 3, 2023

it does support windows - I use it on windows

owittek added a commit to owittek/astrocommunity that referenced this pull request Apr 4, 2023
* feat!: switch to codelldb for rust debugging

* fix: use mason's API for installation path

* fix: cleaner use of the mason api

Co-authored-by: Micah Halter <[email protected]>

* refactor: clean up code a bit

Co-authored-by: Oli <[email protected]>

---------

Co-authored-by: Micah Halter <[email protected]>
Co-authored-by: Oli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document debugging rust with codelldb
5 participants