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

Tab completion on Vectors not working #373

Open
vsndev3 opened this issue May 13, 2024 · 1 comment
Open

Tab completion on Vectors not working #373

vsndev3 opened this issue May 13, 2024 · 1 comment

Comments

@vsndev3
Copy link

vsndev3 commented May 13, 2024

I have this piece of code having issue only with Vectors and not on regular struct. I have to note that this is working for both cases in one system, but no on the other. Have tried ":internal_debug" and shows no difference between working and non working version. What could be the cause of not completing tab completion? I am able to print the actual value though even in non working case. Does this need rust-analyzer to be installed?

Welcome to evcxr. For help, type :help
>> #[derive(Debug,Default)]
struct Sa {
  a: u32,
b: u32
}
let mut v : Vec<Sa> = Vec::<Sa>::new();
v.push(Sa::default());
>> let s : Sa = Sa::default();
>> s.                         << this expands
a  b
>> v[0].                     << fails to expand
>> v[0]
Sa { a: 0, b: 0 }
>> v[0].a
0
@davidlattimore
Copy link
Collaborator

Evcxr uses rust-analyzer as a library - i.e. when you build evcxr, rust-analyzer is built-in to the evcxr binary. So you don't need a separate copy of rust-analyzer installed.

The main thing that evcxr needs in order for things like completions to work is for the rust-src component to be installed. You can check with rustup component list | grep src, which should show:

rust-src (installed)

If it doesn't, then you can install rust-src with rustup component add rust-src.

I don't know if that's the problem - it's just the only idea that comes to mind.

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

No branches or pull requests

2 participants