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

Error when opening any source file from cargo registry #105

Closed
sjclayton opened this issue Dec 20, 2023 · 1 comment
Closed

Error when opening any source file from cargo registry #105

sjclayton opened this issue Dec 20, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@sjclayton
Copy link

sjclayton commented Dec 20, 2023

Neovim version (nvim -v)

NVIM v0.10.0-dev-1902+g184f84234 (Nightly)

Operating system/version

Arch Linux

Output of :checkhealth rustaceanvim

rustaceanvim: require("rustaceanvim.health").check()

Checking for Lua dependencies ~
- WARNING dap not installed. Needed for debugging features [mfussenegger/nvim-dap](https://github.com/mfussenegger/nvim-dap)

Checking external dependencies ~
- OK rust-analyzer: found rust-analyzer 1.74.1 (a28077b 2023-12-04)
- OK Cargo: found cargo 1.74.1 (ecb9851af 2023-10-18)
- OK rustc: found rustc 1.74.1 (a28077b28 2023-12-04)

Checking config ~
- OK No errors found in config.

Checking for conflicting plugins ~
- OK No conflicting plugins detected.

How to reproduce the issue

Open any file in a folder that doesn't seem to have any detectable proper root.

Expected behaviour

File should open as normal, without error.

Actual behaviour

Crashes on load with the message indicated below:

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 "
"..FileTyp
e Autocommands for "rust"..FileType Autocommands for "*"..function 1_LoadFTPlugin[20]..script /home/shaun/.local/share/minimal/lazy/rustaceanvim/ftplugin/rust.lua: Vim(r
untime):E5113: Error while calling lua chunk: ...share/minimal/lazy/rustaceanvim/lua/rustaceanvim/lsp.lua:34: attempt to index a nil value
stack traceback:
...share/minimal/lazy/rustaceanvim/lua/rustaceanvim/lsp.lua:34: in function 'get_mb_active_client_root'
...share/minimal/lazy/rustaceanvim/lua/rustaceanvim/lsp.lua:42: in function 'get_root_dir'
...share/minimal/lazy/rustaceanvim/lua/rustaceanvim/lsp.lua:105: in function 'start'
....local/share/minimal/lazy/rustaceanvim/ftplugin/rust.lua:34: in main chunk
[C]: in function 'nvim_exec_autocmds'
...e/minimal/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:157: in function <...e/minimal/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:156>
[C]: in function 'xpcall'
...ocal/share/minimal/lazy/lazy.nvim/lua/lazy/core/util.lua:113: in function 'try'
...e/minimal/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:156: in function 'trigger'
...e/minimal/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:87: in function <...e/minimal/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:72>
[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>
Press ENTER or type command to continue

The minimal config used to reproduce this issue.

Used the example minimal config.
@sjclayton sjclayton added the bug Something isn't working label Dec 20, 2023
@mrcjkb
Copy link
Owner

mrcjkb commented Dec 20, 2023

Hey 👋

Thanks for reporting. Should be fixed with f158a58.

@mrcjkb mrcjkb closed this as completed Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants