OS: Windows 10 RS4
Rust version: 1.29.0-nightly (866a71325 2018-07-29)
RLS version: 0.129.0-nightly (4c7cc91 2018-07-29)
I have a crate with only one main.rs follow with the following contents:
#[macro_use]
extern crate structopt;
extern crate uuid;
use structopt::StructOpt;
use uuid::Uuid;
#[derive(StructOpt, Debug)]
#[structopt(name = "guids")]
struct App {
#[structopt(short="g", long="guid")]
input: Option<String>,
#[structopt(short="i", long="invert", requires="c_style")]
invert: bool,
#[structopt(short="c", long="c-style")]
c_style: bool,
}
fn main() {
let app: App = App::from_args();
}
I see different completion behavior depending on line endings. If I type the letter "U" in the main function's empty line with CRLF line endings I get fairly complete completions (Uuid, unimplemented!, and a bunch of module suggestions). However if the file has LF line endings the only suggestion I get is for Uuid.
I think only Uuid is intended behavior, but it sounds weird :confused: ...
It seems to give nonsense autocomplete results with CR LF EOLs, but expected behavior with LF ones.
For anyone experiencing this issue, a quick workaround is adding a .gitattributes file to force LF line endings.
Thanks @akovaski :slightly_smiling_face: