This is a personal guide for how to setup Fish & Ruby in macOS Monterey running on an Apple/Silicon M1.
asdf
is used as a version manager for Node and Ruby.
Go to https://brew.sh/ and run the script.
On this version of macOS, it installs to /opt/homebrew
.
This means that paths that reference /usr/local/share
should instead reference /opt/homebrew/opt/<package-name>/share
.
This can be a little confusing when following guides.
I guess you could do some symlinking to avoid this.
Skip if you prefer bash or zsh :)
This guide is pretty good.
You may need to use this guide to set fish
as your default shell.
Don't forget to add brew
to fish path: set -U fish_user_paths /opt/homebrew/bin $fish_user_paths
As a reminder, the fish config file (equivalent of .bash_profile
) is stored in ~/.config/fish/config.fish
.
asdf
is the version manager we will use for Node and Ruby. Use this guide, relevant stops copied over here.
Install asdf (fish specific)
brew install asdf
echo -e "\nsource "(brew --prefix asdf)"/libexec/asdf.fish" >> ~/.config/fish/config.fish
Now we can add the Node and Ruby plugins.
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
Go to the repo and run asdf install
to install the relevant versions of Node and Ruby.
You can check the current versions using asdf current
.
Install iTerm2. Go to Profile.
- Uner General->Working Directory, set to "Reuse previous session's directory"
- Under Colors, set background colour to
14191e
and foreground colour todbdbdb
. - Under Keys->Key mappings, set the preset to Natural Text Editing (allows for opt+arrow for word navigation).
Run fish_config
. Set Dracula as your colour theme.