Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jaredtconnor/58c1e57337fb7237b49c371cf5e40f43 to your computer and use it in GitHub Desktop.

Select an option

Save jaredtconnor/58c1e57337fb7237b49c371cf5e40f43 to your computer and use it in GitHub Desktop.

setting up a fresh mac to a full dev station

this is a personal gist, a list of steps to take in order to bring a fresh copy of macOS to meet the minimum requirements of a fully intergrated development machine. if you came across this file, please feel free to take these configuration steps, comment and, suggest improvments and updates. note that these configurations are highly opinionated and they were wrriten in order to fit specific needs.

step 1: install google chrome

as of today, safari is unexeptable for a web developer, download a browser that has a v8 javascript engine under the hood (like chrome).

step 2: install homebrew package manager

most of the rest will be relying on this package manager

step 3: install oh-my-zsh

oh-my-zsh will allow you to customize your terminal (like a powerline but for mac) after installation:

  • vim ~/.zshrc
  • change ZSH_THEME="robbyrussell" to ZSH_THEME="agnoster"
  • save and quit
  • set the theme to show only current diractory (taken from this issue)

In: ~/.oh-my-zsh/themes/agnoster.zsh-theme

Change the function:

# Dir: current working directory
prompt_dir() {
  prompt_segment blue black '%~'
}

to

# Dir: current working directory
prompt_dir() {
  prompt_segment blue black '%c'
}
  • let's also hide the user@hostname section because we know who we are (taken from this issue)
prompt_context() {
  if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
    prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
  fi
}
  • source .zshrc and...

well that looks crappy 😄...we need a font that supports those glyphs but before we do that, let's fix these ugly colors

step 4: set the gruvbox color theme as the default terminal profile

download this repo (as a zip file)

  • extract the zip file
  • import the gruvbox-dark.terminal to the terminal profiles
  • rename it to whatever...
  • set it as default

step 5: install a nerd-font

a nerd font uses all of the developer required glyphs

  • install the Hack regular complete mono font because it looks awesome
  • change the terminal font to this new font
  • also change the font size to 14 because we're not children anymore

ahh... much better! now that we have a nice looking terminal, we can move on.

step 6: install git

well this step is self explanatory. don't forget to config --global your git to your user.name and user.email. if you're using Github, you may want to setup an ssh access also, let's use vimdiff as our tool for resolving merge conflicts:

git config merge.tool vimdiff
git config merge.conflictstyle diff3
git config mergetool.prompt false

step 7: install nodejs, python3 (with homebrew)

even if you're not going to develop with javascript or python, you need their runtimes in order to configure things for the next step.

step 8: install neovim

neovim will serve us as the IDE, and to turn it into an IDE we need to make a few post-installation steps:

  • install Plug, a plugin manager for vim
  • copy this to ~/.config/nvim/init.vim
  • launch nvim and run :PlugInstall and relunch nvim
  • in case you have problems with python - python3 -m pip install --user --upgrade pynvim
  • in neovim :CocConfig and paste the following content:
{
  "coc.preferences.formatOnSaveFiletypes": [
    "css",
    "markdown",
    "json",
    "html",
    "python",
    "javascript",
    "java"
  ],
  "javascript.suggestionActions.enabled": false,
  "prettier.semi": false,
  "prettier.arrowParens": "avoid",
  "prettier.singleQuote": true,
  "prettier.tabWidth": 2
}

at this point, you almost have a fully cunfigured IDE for web-development, nodejs and python. let's take it a few steps further:

step 9: install Golang

if you're going to develop with the Go programming language. after installation, open nvim and run :GoInstallBinaries and then, install delve which is a debugger for Go. congrats! you have Go support fully integrated with neovim

step 10: install and configure tmux

tmux is the last step in creating an awesome IDE. after installation, copy this file to your home directory. this file contains superior shortcuts and better integration with neovim, along with a sweeter theme.

you're done!

here is a list of extras that you may want to install (depending on the situation)

  • mongo
  • mysql
  • docker
  • postman
  • redux-dev-tools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment