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

Documentation: Use codelldb by Mason #79

Closed
theCollectiv opened this issue Dec 1, 2023 · 4 comments · Fixed by #80
Closed

Documentation: Use codelldb by Mason #79

theCollectiv opened this issue Dec 1, 2023 · 4 comments · Fixed by #80
Labels
enhancement New feature or request

Comments

@theCollectiv
Copy link

Feature description

There is a neat* way to set the codelldb path to Mason. Maybe this can improve the documentation:
mrcjkb/rustaceanvim: Supercharge your Rust experience in Neovim! A heavily modified fork of rust-tools.nvim.

-- codelldb: config with Mason
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"

The advantage is, that codelldb updates do not have to be kept manually in sync or downloaded, if they are handled by Mason.

@mrcjkb
Copy link
Owner

mrcjkb commented Dec 1, 2023

Thanks! I've updated the existing example in the readme 😄

@mrcjkb
Copy link
Owner

mrcjkb commented Dec 1, 2023

Actually, come to think of it, mason is so common. I might as well automate that in the default config.

@mrcjkb mrcjkb closed this as completed in #80 Dec 1, 2023
@theCollectiv
Copy link
Author

theCollectiv commented Dec 1, 2023

I tried it (new installation of rustaceanvim* + Mason install of rust-analyzer & codelldb) and by opening a rust file, I got that error:

(no further setup or custom config of rustaceanvim done from my side)

Error detected while processing BufReadPost Autocommands for "*":                                                                                             
Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:30: Error executing lua: /usr/share/nvim/runtime/filetype.lua:31: BufReadPost Autocommands for "*"..FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20]..script /home/censored/.local/share/nvim/site/pack/packer/start/rustaceanvim/ftplugin/rust.lua: Vim(runtime):E5113: Error while calling lua chunk: .../start/rustaceanvim/lua/rustaceanvim/config/internal.lua:214: attempt to index local 'codell db' (a nil value)
stack traceback:                                                                                                                                              
        .../start/rustaceanvim/lua/rustaceanvim/config/internal.lua:214: in function 'evaluate'                                                               
        ...ker/start/rustaceanvim/lua/rustaceanvim/config/check.lua:81: in function 'validate'                                                                
        .../start/rustaceanvim/lua/rustaceanvim/config/internal.lua:296: in main chunk                                                                        
        [C]: in function 'require'                                                                                                                            
        ...im/site/pack/packer/start/rustaceanvim/ftplugin/rust.lua:2: in main chunk                                                                          
        [C]: in function 'nvim_cmd'                                                                                                                           
        /usr/share/nvim/runtime/filetype.lua:31: in function </usr/share/nvim/runtime/filetype.lua:30>                                                        
        [C]: in function 'nvim_buf_call'                                                                                                                      
        /usr/share/nvim/runtime/filetype.lua:30: in function </usr/share/nvim/runtime/filetype.lua:10>                                                        
stack traceback:                                                                                                                                              
        [C]: in function 'nvim_cmd'                                                                                                                           
        /usr/share/nvim/runtime/filetype.lua:31: in function </usr/share/nvim/runtime/filetype.lua:30>                                                        
        [C]: in function 'nvim_buf_call'                                                                                                                      
        /usr/share/nvim/runtime/filetype.lua:30: in function </usr/share/nvim/runtime/filetype.lua:10>                                                        
stack traceback:                                                                                                                                              
        [C]: in function 'nvim_buf_call'                                                                                                                      
        /usr/share/nvim/runtime/filetype.lua:30: in function </usr/share/nvim/runtime/filetype.lua:10>    

PS.: I'm using Linux/Ubuntu, NeoVIM v0.10.0-dev.

@mrcjkb
Copy link
Owner

mrcjkb commented Dec 1, 2023

Thanks for the update. Will be fixed in #82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants