Clion remote11/23/2023 You can customize the built-in templates and create your own in Settings | Editor | Live Templates | Rust. Various Rust-specific code generation options and intention actions, for example:įull list of intentions is available in Settings | Editor | Intentions | Rust.Ī set of live templates for Rust. For example, you can implement missing members via a quick-fix, and the plugin will correctly substitute a generic type parameter and lifetimes: You can explore the inspections and edit their severities and scopes in Settings | Editor | Inspections | Rust:įor most of the inspections, quick-fixes are available via Alt+Enter. On-the-fly code analysis with a list of Rust-specific inspections. On top of that, it performs highlighting, name resolution, and completion for generated modules and methods from impl blocks, and enables navigation in macro calls.įor more information about how IntelliJ Rust works with declarative macros, refer to this blog post. The default engine provides code insight for generated items such as structs, enums, functions, and traits. Macro expansion engine for declarative macros. In addition to the general code insight features like syntax highlighting, code formatting, navigation, and refactorings, the plugin's language support also includes: IntelliJ Rust is being actively developed, and new features come with every version. To run the linter on demand, use the Run External Linter action. You can enable the external linter to work on the fly, but this might affect performance especially on big projects. In the Cargo dialog, you can configure the external linter if you plan to use one. You can switch to the old engine or turn macro expansion off completely. Use the Expand declarative macros switcher if you want to disable the default new macro expansion engine (in case it fails for your code at some point). In the Rust dialog, adjust the general project settings. Go to Settings | Languages & Frameworks and navigate to the Rust node of the settings tree. In the New Project dialog, provide the paths to the toolchain and the standard library (which you can download via rustup right from the wizard):Ĭlick Create, and CLion will generate a new project with the following structure: Start a new project ( File | New Project) and choose Rust as your project type. Go to File | Open and select the project root directory containing Cargo.toml.Ĭheck the Cargo tool window ( View | Tool windows | Cargo) to make sure the project was imported successfully. Note that only the Cargo-based Rust projects are supported. Install the IntelliJ Rust plugin either directly from JetBrains Marketplace or right from CLion: go to Settings | Plugins, switch to Marketplace, and type Rust in the search field, then click Install in the plugin description dialog. Install the Rust package using rustup.rs or other installation options. Your feedback, feature requests, and bug reports are all welcome in the project's tracker. The Rust plugin is an open-source GitHub project. The plugin provides Rust language engine with a set of code insight features, Cargo support, and debugger functionality (in CLion and IntelliJ IDEA Ultimate). Rust is supported in CLion via the IntelliJ Rust plugin, compatible with all IntelliJ-based IDEs. Find full documentation for IntelliJ Rust on the plugin's Marketplace page.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |