This is an OSX development environment configuration. This README documents the complete process for setting up the development environment, and quickly getting up and running on any OSX machine.
As a general overview, this configuration will replace usage of the default terminal with ITerm2 and Zsh. It uses Zinit as the plugin manager for the terminal. This configuration also provides a robust Neovim and Tmux setup.
This development environment has theme synchronicity based on the Tiede theme, and takes a minimalist stylistic approach with powerful, well-integrated features. (Teide Theme)
With the usage of the install script, it can be fully configured in less than 5 minutes!
Colors: #1D2228 (background), #F97791 (red), #38FFA5 (green), #FFE77A (yellow), #5CCEFF (blue),
#A592FF (purple), #0AE7FF (cyan), #E7EAEE (foreground)
- Run the installer script:
/bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/Rheisen/xavier-config/main/install.sh)"- This will install ITerm2 (web link) and Fira Code Nerd Font (web link)
- This will install Xcode Command Line Tools
- This will install Homebrew and some dependencies via brew
- This will install Rust and some dependencies via cargo
- This will install Node Version Manager and the latest LTS Node version via nvm
- This will make backups of any existing zshrc / tmux / neovim configuration and setup symlinks to Xavier Config
- This will create a dynamic ITerm2 profile with the teide dark theme as the default profile
- Switch to ITerm2 or quit and reopen ITerm2 if you used it for the install (Zinit and zsh plugins will auto-install)
- Plugins and Language Servers for Neovim will auto-install with Lazy when opening Neovim (
nvim) - All done! Check out the next section for usage tips
| Context | Leader Key |
|---|---|
| Tmux | Ctrl+Space |
| Neovim | Space |
The terminal uses ZSH with fzf integration for fuzzy finding and zoxide for smart directory navigation.
| Keybinding | Action |
|---|---|
Ctrl+r |
Fuzzy search command history |
Ctrl+t |
Fuzzy find files |
Alt+c |
Fuzzy find and cd into directory |
Ctrl+p |
History search backward |
Ctrl+n |
History search forward |
Tab |
Trigger fzf-tab completion |
Aliases:
cd- Aliased to zoxide for smart directory jumping (tracks frequently used directories)
All tmux commands are prefixed with the leader key Ctrl+Space.
| Keybinding | Action |
|---|---|
<leader> v |
Split pane vertically |
<leader> s |
Split pane horizontally |
<leader> h/j/k/l |
Navigate panes (vim-style) |
<leader> z |
Toggle zen mode (hide status) |
<leader> r |
Reload tmux configuration |
Press <leader>? to open which-key and view all available keybindings.
| Keybinding | Action |
|---|---|
<leader>ff |
Find files |
<leader>ft |
Find text (grep) |
<leader>/ |
Find text (grep) |
<leader>fb |
Find buffers |
<leader>, |
Find buffers |
<leader>fr |
Find recent files |
<leader>fc |
Find config files |
<leader>. |
Find files in current directory |
<leader>fg |
Find git files |
<leader>fp |
Find projects |
| Keybinding | Action |
|---|---|
Ctrl+n |
Select next completion item |
Ctrl+p |
Select previous completion item |
Ctrl+e |
Accept completion |
Ctrl+y |
Hide completion menu |
Ctrl+k |
Toggle documentation |
Completion sources: LSP, file paths, snippets, buffer words.
| Keybinding | Action |
|---|---|
K |
Hover documentation |
gd |
Go to definition |
gD |
Go to declaration |
gI |
Go to implementation |
gy |
Go to type definition |
gpd |
Preview definition (popup) |
gpD |
Preview declaration (popup) |
gpt |
Preview type definition |
gpi |
Preview implementation |
gP |
Close all preview windows |
| Keybinding | Action |
|---|---|
<leader>vs |
Git status (Neogit) |
<leader>vc |
Git commit |
<leader>vp |
Git pull |
<leader>vP |
Git push |
<leader>vb |
Git branches |
<leader>vd |
Git diff (hunks) |
<leader>vlr |
Git log (repo) |
<leader>vlf |
Git log (file) |
<leader>vll |
Git log (line) |
<leader>sh |
Stage hunk |
<leader>sb |
Stage buffer |
<leader>rh |
Reset hunk |
<leader>rb |
Reset buffer |
<leader>gh |
Go to next hunk |
<leader>gH |
Go to previous hunk |
| Keybinding | Action |
|---|---|
<leader>t |
Toggle file tree (Neotree) |
<leader>z |
Toggle zen mode |
<leader>y |
Yank to system clipboard |
<leader>p |
Paste from system clipboard |
<leader>n |
Clear search highlighting |
<leader>j |
Open scratch buffer |
<leader>J |
Select scratch buffer |
Ctrl+h/j/k/l |
Navigate between windows |
- Ruby Version Manager (RVM) (web link)
Install or upgrade the following with Homebrew:
brew install zshbrew install neovimbrew install gitbrew install tmuxbrew install fzfbrew install ripgrepbrew install fdbrew install zoxide- Done
brew install gradlebrew tap pivotal/tapbrew install springbootbrew install gnupg gnupg2brew install git-flow
- Configure git if git is not already configured.
- Git clone this repository inside the root directory.
- Hide the repository (optional, recommended):
mv xavier-config .xavier-config - Open the repository with finder:
open ~/.xavier-config - Done
- Open ITerm2 (if you didn't use it in the previous step)
- Ensure Zsh is the default shell:
sudo sh -c "echo $(which zsh) >> /etc/shells" && chsh -s $(which zsh) - Copy the "iterm" folder somewhere easily findable:
cp ~/.xavier-config/iterm ~/documents/iterm - Open the ITerm2 Preferences Menu (ITerm2 > Preferences)
- Select Profiles, Select Colors, Select "Import" from Color Presets in bottom right corner
- Import
xavier-config.itermcolorsfrom within documents/iterm - Recommended: No cursor guide, 0 Minimal Contrast, 0 Cursor Boost
- Select Text (still under Profiles), and change Font to FiraCode Nerd Font (Retina or Regular recommended)
- Done
- Remove (
rm ~/.config/nvim/init.vim) or create the nvim directory (mkdir ~/.config; mkdir ~/.config/nvim) - Symlink the xavier-config NeoVim configuration:
ln -s ~/.xavier-config/nvim/init.vim ~/.config/nvim/init.vim - Open the nvim init file
nvim ~/.xavier-config/init.vimand run:PlugInstall - Follow the comments in the init.vim file for installing CoC language support as desired.
- Copy the .zshrc-example file as the base for your new .zshrc:
cp ~/.xavier-config/zsh/.zshrc-example ~/.xavier-config/zsh/.zshrc - Open the zshrc file:
nvim ~/.xavier-config/zsh/.zshrcand change the ZSH export as needed - Add any additonal scripts from previous configuration files to this zshrc
- Remove the current ZSH configuration:
rm ~/.zshrc - Symlink the xavier-config ZSH configuration:
ln -s ~/.xavier-config/zsh/.zshrc ~/.zshrc
- Symlink the Tmux configuration:
ln -s ~/.xavier-config/.tmux.conf ~/.tmux.conf - Done
