-
Notifications
You must be signed in to change notification settings - Fork 3
Set up a fresh MacOS For Development
This is mostly a note to myself on how to set up a fresh MacOS for Java Development. You can use these instructions to install Neovim and my dotfiles configuration, just follow them from the beginning up to Java section. If you are only interested in Neovim, you need only brew from the Bare Essentials (see below).
Open source software changes rapidly and usually with no concern for backwards compatibility. I learned this the hard way when installing my dotfiles in a new Mac. Newest tmux and neovim versions introduced changes that broke my configurations resulting in annoying bugs. Fixing these bugs sometimes takes a persistent and time consuming research on relevant online resources. Just keep this in mind while installing my dotfile configuration in your system. I did the best I could to document my installation during an actual new setup.
- Download and install Chrome
- Install Magnet for Window Management
- Install Brew
- Assign Basic Fn keys (Settings/keyboard/shortcuts) F2 Focus on menu bar, F3 Focus dock, F4 next active window
brew cask install iterm2
ssh-keygen -t rsa -C "kabasakalis@gmail.com"
Copy the contents of the public key /Users/{user}/.ssh
in my github and bitbucket key configurations.
brew install coreutils
brew install zsh zsh-completions
Run zsh for default configuration.
Copy the following line to .zshrc
:
fpath=(/usr/local/share/zsh-completions $fpath)
curl -L /~https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
Switch shell from bash to zsh, in command line:
chsh -s /bin/zsh
The defaul .oh-my-zsh.zsh
will be later overwritten from my dotfiles.
Download and install Powerline fonts.
cd fonts && install.sh
Make sure neovim/plugins.vim
file in dotfiles
contains Plug 'ryanoasis/vim-devicons'
Install Nerd fonts simply with
brew tap caskroom/fonts
brew cask instald font-hack-nerd-font
Also checkout instructions in nerd-fonts
After you have installed powerline fonts and nerd fonts you have to use them in iTerm2. Go to iTerm2 preferences and assign your favorite powerline font as the main editor font, and your favorite nerd font as the non-character font (used to render file-icons among other eye candy).
Add in .bashrc to make zsh default shell
if [ -t 1 ]; then
exec zsh
fi
brew install neovim
sudo gem install rubocop rubocop-rspec starscope ruby-beautify haml-lint scss-lint mdl neovim && npm install js-beautify && install exuberant-ctags && install xclip rcodetools
sudo gem install tmuxinator
Install Python. This is required from Neovim.
brew install python (version 3)
brew install python@2 (version 2)
Then install these libraries:
pip3 install \
virtualenv \
flake8 \
isort \
jedi \
mistune \
psutil \
psutil \
setproctitle \
neovim \
pip2 install \
virtualenv \
flake8 \
isort \
jedi \
mistune \
psutil \
psutil \
setproctitle \
neovim \
Add in dotfiles/neovim/init.vim:
let g:python_host_prog = "/usr/local/bin/python2"
let g:python3_host_prog = "/usr/local/bin/python3"
Mainly for awesome tmuxinator gem
Make appropriate changes in .zshenv
(default ruby version if you want to install a version manager).
brew cask install xquartz
brew install xclip
Install node.js, download pkg file.
Run in terminal npm install -g neovim
brew install the_silver_searcher
One of two ways:
-
brew install tmux
-
Run script, (edit version first)
./dotfiles/scripts/tmux_install.sh
(bottom bar in screenshot).See my disclaimer on top of this page. I was not able to make this work with the newer version of tmux.
git clone git@github.com:kabasakalis/dotfiles.git
in your home folder.
cd dotfiles
git submodule update --init --recursive
(fetches dotbot)
./dotbot/bin/dotbot -d ~/dotfiles -c ~/dotfiles/installmac.conf.yaml
Start iTerm2 and then neovim with nvim
executable and type command
:PlugInstall
(Plugins may install automatically on neovim startup)
Create yml configuration files inside dotfiles/tmuxinator
folder, with name name
,
and start the session with alias txs name
. Stop session with tks name
.
In neovim run :checkheath
and make sure there are no errors or warnings.
brew update
brew tap caskroom/cask
brew install brew-cask-completion
brew update && brew upgrade brew-cask-completion && brew cleanup && brew cask cleanup
Check if we already have JDK 6, 7, 8, 9 installed by Homebrew Cask:
brew tap caskroom/versions
brew cask info java6
brew cask info java7
brew cask info java8
To check JDK 10 (latest)
brew cask info java
brew tap caskroom/versions
brew cask install java6
brew cask install java7
brew cask install java8
To install JDK 10 (latest):
brew cask install java
brew install jenv
In .zshrc set:
eval "$(jenv init -)"
Add java paths in jenv, run in command line:
jenv add /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/
Check java versions:
jenv versions
brew update && brew install maven
maven_version=3.5.3
export M2_HOME=/usr/local/Cellar/maven/$maven_version/libexec
export M2=$M2_HOME/bin
PATH=$M2_HOME/bin:$PATH
brew update && brew install gradle
gradle_version=4.7
export GRADLE_HOME=/usr/local/Cellar/gradle/$gradle_version/libexec
export GRADLE=$GRADLE_HOME/bin
PATH=$GRADLE_HOME/bin:$PATH
Install IntellijIDEA, Webstorm, Datagrip
Go to codota site
Go to Dash