/rust-rover-settings

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

Primary LanguageShell

Rust Rover IDE (MacOS Settings)

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

1. Download and Import rust-rover-settings.zip Alt 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

Top Left Sidebar Tool Windows
Tool Window Keys (CMD+Fn Keys) Leftsidebar Description
CMD+F1 Project
CMD+F2 Structure
CMD+F3 Cargo
CMD+F4 Make
CMD+F5 Bookmarks
Top Right Sidebar Tool Windows
Tool Window Keys (CMD+Fn Keys) RightSidebar Description
CMD+F12 Notifications
CMD+F11 Key Promoter X (Plugin Required)
CMD+F10 Database
CMD+F9 Pieces
Bottom Left Sidebar Tool Windows
Tool Window Keys (OPT+Keys) Leftsidebar Bottom Description
OPT+C Commit
OPT+B Build
OPT+A Services
OPT+P Problems
OPT+D Debug
OPT+F Find
OPT+R Run
Fn Keys Mainly used for refactoring and documentation
Keyboard Shortcuts Description
F1 Quick Documentation
F2 Rename
F3 Refactor this
F4 Change Signature
F5 Refactor: Copy
F6 Refactor: Move
Rust Runnables
Keyboard Shorcuts Description
CMD+R Run Context Configuration
CMD+SHIFT+R Re-Run
CMD+SHIFT+P Run Cargo Command
OPT+SHIFT+F Format RSX
OPT+SHIFT+V Html to RSX
OPT+SHIFT+N New Cargo Crate
Debugging
Keyboard Shorcuts Description
CMD+T Debug Context Configuration
CMD+SHIFT+T Stop
CMD+D Resume Program
CMD+SHIFT+D Toggle Breakpoint
CMD+L Step Into
CMD+H Step Out
CMD+J Step Over
CMD+K Run to Cursor
Errors / Warning
Keyboard Shortcut Description
OPT+P Tool Windows -> Problems
OPT+SHIFT+P Run Rust External Linter
OPT+SHIFT+I Inspect Code with Editor Settings
CMD+E Next Highlighted Error
CMD+SHIFT+E Previous Highlighted Error
HYPER+CMD+J Jump to Source
HYPER+CMD+K Jump to Navigation bar
Auto Complete
Keyboard Shortcut Description
OPT+, Cyclic Expand Word Backward
OPT+. Cyclic Expand Word
CTRL+Space Basic
CTRL+SHIFT+Space Type Matching
CMD+SHIFT+Enter Complete Current Statement
TAB Insert Inline Proposal
Code Generations
Keyboard Shortcut Description
OPT+O Override Methods
OPT+I Implement Methods
OPT+G Generate
Quickly Jump from One Place to Another
Keyboard Shortcut Description
OPT+Z Activate / Cycle AceJump Mode
Multi-Cursor
Keyboard Shortcut Description
CMD+] Find Next / Move to Next Occurrence
CMD+[ Find Previous / Move to Previous Occurrence
CMD+SHIFT+] Unselect Previous Occurrence
CMD+SHIFT+[ Add Selection for Next Occurrence
CMD+SHIFT+\ Select All Occurrence
GoTo
Keyboard Shortcut Description
CMD+U or gd (Vim) Go to Declaration or Usages
CMD+SHIFT+U Find Usages
CMD+I Go to Implementations
CMD+Y Go to Super Method
CMD+SHIFT+Y Go to Declaration Type
SHIFT+K (Vim) Quick Definition
F1 Quick Documentation
CMD+G Go to by Reference actions
All About Files Search, Opening
Keyboard Shortcut Description
CMD+F Find
CMD+SHIFT+F Find in Files
CMD+SHIFT+U Find Usages
CMD+P Search Everywhere
CMD+O Go to Type
CMD+SHIFT+P Go To Files
CTRL+O Open Files
Bookmarks
Keyboard Shortcut Description
CMD+M Go to Mnemonic
CMD+SHIFT+M Toggle Bookmark Mnemonic
CMD+B Show Bookmarks
CMD+SHIFT+B Toggle Bookmark / Mnemonic
OPT (SHIFT) [H,J,K,L]

Selection

Keyboard Shortcut Description
OPT+H Shrink Selection
OPT+L Expand Selection
OPT+SHIFT+H Show History for Selection
OPT+SHIFT+L Surround with

Moving Up and Down

Keyboard Shortcut Description
OPT+J Move Line Down
OPT+K Move Line Up
OPT+SHIFT+J Move Statement Down
OPT+SHIFT+K Move Statement Up
Moving Panes on Splits
Keyboard Shortcut Description
CTRL+H Move to Left Pane
CTRL+J Move Down Pane
CTRL+K Move to Right Pane
CTRL+L Move Up Pane
Easy Tab Switching
Keyboard Shortcut Description
CMD+[1-9] Select Tab [1-9]
Comments Folding
Keyboard Shortcut Description
CMD+/ Comment with Line Comment
CMD+SHIFT+/ Comment with Block Comment
CMD+(-) Folding Collapse
CMD+(+) Folding Expand
CMD+SHIFT+(-) Collapse All
CMD+SHIFT+(+) Expand All
Type Hinting, Quick Fixes
Keyboard Shortcut Description
CMD+SHIFT+. Parameter Info
CMD+SHIFT+I Type Info
CMD+. Show Context and Show Quick Fixes
File Manipulation
Shortcut Keys Description
CMD+N New File
CMD+SHIFT+N New Directory
OPT+N New Rust File
OPT+SHIFT+N New Crate
Snippets
Shortcut Keys Description
OPT+F1 Insert Live Template
OPT+F2 Surround with Live Template
OPT+F3 Save as Live Template
Copy / Paste / Undo / Redo
Shortcut Keys Description
CMD+S Save all
CMD+X Cut
CMD+V Paste
CMD+Z Undo
CMD+SHIFT+Z Redo
Copilot
Shortcut Keys Description
CMD+SHIFT+H Show Previous Completions
CMD+SHIFT+J Apply Next line of Completion to Editor
CMD+SHIFT+K Apply Next Word of Completion to Editor
CMD+SHIFT+L Show Next Completion
Notifications
Keyboard Shortcut Description
CMD+F12 Tool Windows -> Notification
OPT+SHIFT+\ Clear all Notifications
Context Menus
Keyboard Shortcut Description
OPT+T External Tools
OPT+Q Select In
OPT+E Recent Files
OPT+SHIFT+E Recent Locations
OPT+SHIFT+S Replace in Files
OPT+SHIFT+D Debug
OPT+SHIFT+C Show Color Picker
OPT+SHIFT+N New Cargo Crate
OPT+SHIFT+X Copy Refactor
OPT+SHIFT+M Show Context Menu

Customizing IdeaVim Keys

check list of Actions we can bind with .IdeaVim to our Keys

:actionlist

We can add custom bindings to our ~/.ideavimrc

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

  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 Keys Description
CMD+\ Open Tasks
Pieces
Keyboard Shortcut Description
CMD+SHIFT+S Save to Pieces
CMD+F9 Tool Windows -> Pieces