simrat39 / rust-tools.nvim

Tools for better development in rust using neovim's builtin lsp
MIT License
2.17k stars 158 forks source link

Improvement for documentation: Mason + Rusttools + vakim/codelldb #302

Closed theCollectiv closed 1 year ago

theCollectiv commented 1 year ago

Hence, a lot of people are using williamboman/mason.nvim and normally you got to hard-code the path for codelldb bound to the Version of it, there is a more elegant way...

Disclaimer: It's not mine, I 'stole' it from (or better I found it there and tried successfully) https://github.com/LunarVim/LunarVim/issues/2894#issuecomment-1236420149

  1. Install codelldb via Mason
  2. Construct the path to the local vakim/codelldb via
    local path = vim.fn.glob(vim.fn.stdpath("data") .. "/mason/packages/codelldb/extension/") or ""
    local codelldb_path = path .. "adapter/codelldb"
    local liblldb_path = path .. "lldb/lib/liblldb.so"

Maybe this can be added to the documentation for rust-tools.nvim.

theCollectiv commented 1 year ago

Moved to discussion.