Skip to content

Repository files navigation

Rust Rover IDE (MacOS Settings)

Better workflow , testing and debugging capability on your Next Rust Projects

WARNING: This will make your Rust Journey EASY!

1. Download and Import rust-rover-settings.zipAlt text
2. Install Plugins
  • IdeaVim
  • IdeaVim-Sneak
  • Whichkey
  • .env file support
  • Key Promoter X
  • Github Copilot
  • Ace Jump
  • Linear
3. Load `codeitlikemiley` keymap

Alt text

Move the Downloaded file to your Home Directory ~/.ideavimrc

5. Learn The Keymap The Easy Way

Toggle Tool Windows
Keyboard ShortcutDescription
CMD+JHide Active Tool Window(Focus Editor)
F12Hide All Tools Windows
Top Left Sidebar Tool Windows
Tool Window Keys (CMD+Fn Keys) LeftsidebarDescription
CMD+F1Project
CMD+F2Commit
CMD+F3Bookmarks
CMD+F4Pull Requests
Top Right Sidebar Tool Windows
Tool Window Keys (CMD+Fn Keys) RightSidebarDescription
CMD+F12Notifications
CMD+F11Cargo
CMD+F10Key Promoter X (Plugin Required)
Bottom Left Sidebar Tool Windows
Tool Window Keys (OPT+Keys) Leftsidebar BottomDescription
OPT+GGit
OPT+BBuild
OPT+SServices
OPT+PProblems
OPT+DDebug
OPT+FFind
OPT+RRun
Fn Keys Mainly used for refactoring and documentation
Keyboard ShortcutsDescription
F1Quick Documentation
F2Rename
F3Refactor this
F4Change Signature
F5Load Changes
Rust Runnables
Keyboard ShorcutsDescription
CMD+RRun Context Configuration
CMD+SHIFT+RRun
CMD+TExternal Tools

Note: External Tools Command Available depends on what you configure on my machine i have the ff:

  • Format RSX
  • HTML to RSX
  • Dx Serve SSR
  • Dx Serve Desktop

Et. al.

Debugging
Keyboard ShorcutsDescription
CMD+BToggle Breakpoint
CMD+SHIFT+SStop
OPT+LStep Into
OPT+JStep Over
OPT+KPause / Resume Program
OPT+HStep Out
Errors / Warning
Keyboard ShortcutDescription
OPT+PProblems
OPT+SHIFT+IInspect Code with Editor Settings
]+E (VIM)Next Error
[+E (VIM)Previous Error
TAB+EError Description
Quickly Jump from One Place to Another
Keyboard ShortcutDescription
S (Vim)Activate / Cycle AceJump Mode
leader+leader+wSearch Word Forward
leader+leader+bSearch Word Backward
leader+leader+fSearch Char Forward
leader+leader+FSearch Char Backward
Multi-Cursor
Keyboard ShortcutDescription
CMD+GFind Next / Move to Next Occurrence
CMD+SHIFT+GFind Previous / Move to Previous Occurrence
CMD+DAdd Selection for Next Occurrence
CMD+SHIFT+DUnselect Occurrence
CMD+SHIFT+LSelect All Occurrence
Code Completions
Keyboard ShortcutDescription
OPT+/Cyclic Expand Word
OPT+SHIFT+/Cyclic Expand Backward
OPT+SpaceBasic
OPT+ENTERType Matching
Type Hinting, Quick Fixes, Formatting
Keyboard ShortcutDescription
gpParameter Info
gtExpression Type Info
CMD+.Show Context and Show Quick Fixes
CMD+SHIFTT+IReformat Code
OPT+SPACEInsert Live Template
OPT+WSurround with
CMD+KCode Generate
CMD+LComplete Current Statement
Macro Expansion
Keyboard ShortcutDescription
CMD+MShow Recursive Macro Expansion
CMD+SHIFT+MRe-Expand All Rust Macro
GoTo
Keyboard ShortcutDescription
gd (Vim)Go to Declaration or Usages
gD (Vim)Go to TypeDeclaration
gu (Vim)Find Usages
gi (Vim)Go to Implementations
CMD+UGo to Super Method
SHIFT+K (Vim)Quick Definition
F1Quick Documentation
Finders
Keyboard ShortcutDescription
CMD+FFind
CMD+ERecent Files
CMD+SHIFT+FFind in Files
CMD+HReplace
CMD+SHIFT+HReplace in Files
SHIFT+SHIFTSearch Everywhere
CMD+PGo To File
CMD+SHIFT+PRun any Command
CMD+OGo to Symbol
CMD+SHIFT+OGo To Types
SHIFT+SPACEGo to Action
CMD+SHIFT+TGo to Test
CMD+YFile Structure
Bookmarks
Keyboard ShortcutDescription
leader+[0-9]Go to Bookmark by number
leader+[a-z]Go to Bookmark by letters
'+[a-z]Toggle Bookmark by letters
'+[0-9]Toggle Bookmark by number
Code Selections
Keyboard ShortcutDescription
OPT+DOWNShrink Selection
OPT+UPExpand Selection
Move Statements
Keyboard ShortcutDescription
OPT+SHIFT+JMove Statement Down
OPT+SHIFT+KMove Statement Up
Move Lines
Keyboard ShortcutDescription
CMD+SHIFT+JMove Line Down
CMD+SHIFT+KMove Line Up
Split Panes
Keyboard ShortcutDescription
s+pHorizontal Split
v+s++pVertical Split
Moving Across Panes
Keyboard ShortcutDescription
CTRL+HMove to Left Pane
CTRL+JMove Down Pane
CTRL+KMove to Right Pane
CTRL+LMove Up Pane
Tab Switching
Keyboard ShortcutDescription
CMD+[1-9]Select Tab [1-9]
CMD+[Select Previous Tab
CMD+]Select Next Tab
TAB+[Navigate Tab Back
TAB+]Navigate Tab Forward
Comments
Keyboard ShortcutDescription
CMD+/Comment with Line Comment
CMD+SHIFT+/Comment with Block Comment
Code Folding
Keyboard ShortcutDescription
CMD+(-)Folding Collapse
CMD+(+)Folding Expand
CMD+SHIFT+(-)Collapse All
CMD+SHIFT+(+)Expand All
File Manipulation
Shortcut KeysDescription
CMD+NNew
CMD+SHIFT+NNew Directory

Note: New has Different ways to create Files including Directory

File Editing
Shortcut KeysDescription
CMD+SSave all
CMD+XCut
CMD+VPaste
CMD+ZUndo
CMD+SHIFT+ZRedo
Notifications
Keyboard ShortcutDescription
CMD+F12Tool Windows -> Notification
CMD+SHIFT+F12Clear all Notifications
OPT+SHIFT+MMaximize Tool Window
Context Menus
Keyboard ShortcutDescription
OPT+SHIFT+CShow Color Picker
SHIFT+F1Show Context Menu
VCS
Keyboard ShortcutDescription
OPT+AAmend
OPT+CCommit File
OPT+SHIFT+AAdd to .gitignore
CMD+SHIFT+AAdd to VCS
CMD+SHIFT+URollback
CMD+SHIFT+MMove to other Changelist
Git History
Keyboard ShortcutDescription
OPT+SHIFT+RCompare with Revisions
CMD+SHIFT+YShow History / Diff
CMD+JNext Difference
CMD+KPrevious Difference

Customizing IdeaVim Keys

  1. Enable Idea Vim on Actions List
:actionlist
  1. Open Action List

SHIFT+SPACE

  1. Set ON
IdeaVim: Track Action IDs

All the Keys and Commands You Invoke Now will be shown as a Notification

  1. Open ~/.ideavimrc

  2. Add Custom Vim Key Bindings

nmap <leader>v :action Tool_External Tools_gvim<cr>

Custom Keymap to Invoke External CLI Commands

This is useful e.g. , We wanna add CMD+SHIFT+X to format RSX in rust with Dioxus CLI

See How To do It

Open settings with CMD + ,

Go to Tools -> External Tools

Then Click (+) Sign to Create new External Tool

Alt text

To Get the Path of Command Use which e.g.

which dx , outputs: /Users/uriah/.cargo/bin/dx

also we need to check what arguments we can use

we can run dx --help

dx --help
Build, Bundle & Ship Dioxus Apps
Usage: dx [OPTIONS] <COMMAND>
Commands:
build Build the Rust WASM app and all of its assets
translate Translate some source file into Dioxus code
serve Build, watch & serve the Rust WASM app and all of its assets
create Init a new project for Dioxus
clean Clean output artifacts
bundle Bundle the Rust desktop app and all of its assets
version Print the version of this extension
fmt Format some rsx
check Check the Rust files in the project for issues
config Dioxus config file controls
help Print this message or the help of the given subcommand(s)
Options:
-v Enable verbose logging
--bin <BIN> Specify bin target
-h, --help Print help
-V, --version Print version

Get dx fmt argurments

dx fmt --help
Format some rsx
Usage: dx fmt [OPTIONS]
Options:
-c, --check Run in'check' mode. Exits with 0 if input is formatted correctly. Exits with 1 and prints a diff if formatting is required
-r, --raw <RAW> Input rsx (selection)
-f, --file <FILE> Input file
--bin <BIN> Specify bin target
-h, --help Print help

in order to format a file we need to use -f parameter

to get the filepath we can get it with Insert Macro

Just Click the Plus sign as shown on the image below.

Alt text

We got $FilePath$

Alt text

Click Insert then Go Bind the KeyMap

Alt text

Setting Up Linear

Step by Step Guide
  1. Go to Settings -> Tools -> Tasks -> Server
  2. Add Server
  3. Pick Linear
  4. Set:
    • Team ID e.g (COD)
    • API Key (Workspace API)
    • Workspace ID (codeitlikemiley)
  5. Click Test
Linear KeysDescription
CMD+\Open Tasks
CMD+SHIFT+\Switch Tasks

About

Rust Rover Has some shitty keybindings, This makes it more logical to sink in your muscle memory

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages