rls icon indicating copy to clipboard operation
rls copied to clipboard

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

Open Eric-Arz opened this issue 5 years ago • 1 comments

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.

Eric-Arz avatar Sep 08 '20 12:09 Eric-Arz

I am having the same isssue working with SysInfo

SebastianFelgueras avatar Apr 09 '21 20:04 SebastianFelgueras