Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

code completion not working for a lot of traits from library crates #1697

Open
Eric-Arz opened this issue Sep 8, 2020 · 1 comment
Open

Comments

@Eric-Arz
Copy link

Eric-Arz commented Sep 8, 2020

Code completion in Visual Studio Code seems to only work reliably for code inside your own project. For traits and structs coming from extern crates it fails to see most of the available methods despite the code compiling and running fine.

use sdl2;

fn main() {
	let sdl_context = sdl2::init().unwrap();

	let video_subsystem = sdl_context.video().unwrap();

	let window = video_subsystem
			.window("Test", 800, 800)
			.resizable()
			.position_centered()
			.build()
			.unwrap();
}

For example in this code snippet using the crate sdl2 rls code completion fails to see any of the methods from the VideoSubsystem struct that is returned by sdl_context.video().unwrap(). Only after typing everything out it recognizes the methods and displays mouseover details and ctrl-click navigation to the implementation.

@SebastianFelgueras
Copy link

I am having the same isssue working with SysInfo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants