Skip to content

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

Notifications You must be signed in to change notification settings

codeitlikemiley/rust-rover-settings

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.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

Toggle Tool Windows
Keyboard Shortcut Description
CMD+J Hide Active Tool Window(Focus Editor)
F12 Hide All Tools Windows
Top Left Sidebar Tool Windows
Tool Window Keys (CMD+Fn Keys) Leftsidebar Description
CMD+F1 Project
CMD+F2 Commit
CMD+F3 Bookmarks
CMD+F4 Pull Requests
Top Right Sidebar Tool Windows
Tool Window Keys (CMD+Fn Keys) RightSidebar Description
CMD+F12 Notifications
CMD+F11 Cargo
CMD+F10 Key Promoter X (Plugin Required)
Bottom Left Sidebar Tool Windows
Tool Window Keys (OPT+Keys) Leftsidebar Bottom Description
OPT+G Git
OPT+B Build
OPT+S 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 Load Changes
Rust Runnables
Keyboard Shorcuts Description
CMD+R Run Context Configuration
CMD+SHIFT+R Run
CMD+T External 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 Shorcuts Description
CMD+B Toggle Breakpoint
CMD+SHIFT+S Stop
OPT+L Step Into
OPT+J Step Over
OPT+K Pause / Resume Program
OPT+H Step Out
Errors / Warning
Keyboard Shortcut Description
OPT+P Problems
OPT+SHIFT+I Inspect Code with Editor Settings
]+E (VIM) Next Error
[+E (VIM) Previous Error
TAB+E Error Description
Quickly Jump from One Place to Another
Keyboard Shortcut Description
S (Vim) Activate / Cycle AceJump Mode
leader+leader+w Search Word Forward
leader+leader+b Search Word Backward
leader+leader+f Search Char Forward
leader+leader+F Search Char Backward
Multi-Cursor
Keyboard Shortcut Description
CMD+G Find Next / Move to Next Occurrence
CMD+SHIFT+G Find Previous / Move to Previous Occurrence
CMD+D Add Selection for Next Occurrence
CMD+SHIFT+D Unselect Occurrence
CMD+SHIFT+L Select All Occurrence
Code Completions
Keyboard Shortcut Description
OPT+/ Cyclic Expand Word
OPT+SHIFT+/ Cyclic Expand Backward
OPT+Space Basic
OPT+ENTER Type Matching
Type Hinting, Quick Fixes, Formatting
Keyboard Shortcut Description
gp Parameter Info
gt Expression Type Info
CMD+. Show Context and Show Quick Fixes
CMD+SHIFTT+I Reformat Code
OPT+SPACE Insert Live Template
OPT+W Surround with
CMD+K Code Generate
CMD+L Complete Current Statement
Macro Expansion
Keyboard Shortcut Description
CMD+M Show Recursive Macro Expansion
CMD+SHIFT+M Re-Expand All Rust Macro
GoTo
Keyboard Shortcut Description
gd (Vim) Go to Declaration or Usages
gD (Vim) Go to TypeDeclaration
gu (Vim) Find Usages
gi (Vim) Go to Implementations
CMD+U Go to Super Method
SHIFT+K (Vim) Quick Definition
F1 Quick Documentation
Finders
Keyboard Shortcut Description
CMD+F Find
CMD+E Recent Files
CMD+SHIFT+F Find in Files
CMD+H Replace
CMD+SHIFT+H Replace in Files
SHIFT+SHIFT Search Everywhere
CMD+P Go To File
CMD+SHIFT+P Run any Command
CMD+O Go to Symbol
CMD+SHIFT+O Go To Types
SHIFT+SPACE Go to Action
CMD+SHIFT+T Go to Test
CMD+Y File Structure
Bookmarks
Keyboard Shortcut Description
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 Shortcut Description
OPT+DOWN Shrink Selection
OPT+UP Expand Selection
Move Statements
Keyboard Shortcut Description
OPT+SHIFT+J Move Statement Down
OPT+SHIFT+K Move Statement Up
Move Lines
Keyboard Shortcut Description
CMD+SHIFT+J Move Line Down
CMD+SHIFT+K Move Line Up
Split Panes
Keyboard Shortcut Description
s+p Horizontal Split
v+s++p Vertical Split
Moving Across Panes
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
Tab Switching
Keyboard Shortcut Description
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 Shortcut Description
CMD+/ Comment with Line Comment
CMD+SHIFT+/ Comment with Block Comment
Code Folding
Keyboard Shortcut Description
CMD+(-) Folding Collapse
CMD+(+) Folding Expand
CMD+SHIFT+(-) Collapse All
CMD+SHIFT+(+) Expand All
File Manipulation
Shortcut Keys Description
CMD+N New
CMD+SHIFT+N New Directory

Note: New has Different ways to create Files including Directory

File Editing
Shortcut Keys Description
CMD+S Save all
CMD+X Cut
CMD+V Paste
CMD+Z Undo
CMD+SHIFT+Z Redo
Notifications
Keyboard Shortcut Description
CMD+F12 Tool Windows -> Notification
CMD+SHIFT+F12 Clear all Notifications
OPT+SHIFT+M Maximize Tool Window
Context Menus
Keyboard Shortcut Description
OPT+SHIFT+C Show Color Picker
SHIFT+F1 Show Context Menu
VCS
Keyboard Shortcut Description
OPT+A Amend
OPT+C Commit File
OPT+SHIFT+A Add to .gitignore
CMD+SHIFT+A Add to VCS
CMD+SHIFT+U Rollback
CMD+SHIFT+M Move to other Changelist
Git History
Keyboard Shortcut Description
OPT+SHIFT+R Compare with Revisions
CMD+SHIFT+Y Show History / Diff
CMD+J Next Difference
CMD+K Previous 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 Keys Description
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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages