{
  "$type": "site.standard.document",
  "canonicalUrl": "https://deterministic.space/rust-ide-wishlist.html",
  "path": "/rust-ide-wishlist.html",
  "publishedAt": "2016-09-30T00:00:00.000Z",
  "site": "at://did:plc:x67qh7v3fd7znbdhauc45ng3/site.standard.publication/3mjcd2t6afe25",
  "textContent": "Some ideas for editor/IDE features to make working on Rust code more pleasant.\n\nReading code\n\n- Go to definition\n- Show where a function is used\n- Show documentation\n- Show type on hover\n\nWriting code\n\n- Show errors/warnings inline (including those from external lints like clippy)\n- Autocomplete (stand-alone tool: racer)\n- Automatic code formatting (using rustfmt)\n- Insert the usual boilerplate code for impls (the method signatures from the trait definition)\n- Add missing imports/use statements (when they can be guessed)\n- Apply suggestions for \"Did you mean …?\" errors (e.g. for typos in identifier names)\n\nRefactoring code\n\n- Apply suggestions from (clippy) lints (experimental tool: rustfix), e.g.:\n\t- Remove unneeded return statements and redundant closures\n\t- Replace .or_insert(Vec::new()) with .or_insert_with(Vec::new)\n\t- Use list.iter().enumerate instead of for i in 0..list.len()\n- Replace glob imports with a concrete list of used imported items\n- Extract impl Type into a new trait\n- Replace a function argument with a type parameter\n\t(e.g., with shortcuts for fn foo(x: i32) → fn foo<T: Into<i32>>(x: T))\n- Move type definition and impls into new module\n\t(i.e., move parts of a large module into new file)\n- Move #[test] functions into a #[cfg(test)] mod test\n\n- - -\n\nSome of these things already work with RustyCode, the extension for VSCode I'm currently using.\n\nThe official and most promising effort for implementing the features mentioned above in a way that editor/IDE plugins can easily use them is the plan for a Rust Language Server:\n\n- RFC #1317\n- rustls (experimental implementation, not to be confused with the Rust TLS stack)\n- rustls_vscode (VSCode extension using language server)",
  "title": "Rust IDE Features Wishlist",
  "updatedAt": "2016-09-30T00:00:00.000Z"
}