맥 개발환경 설정

맥 개발환경 설정

새로 받은 맥북을 이렇게 셋팅했습니다

기본설정

Xcode

git

$ brew install gpg
$ gpg --list-secret-keys [email protected]
$ gpg --export-secret-keys [email protected] > k-gpg.key
$ gpg --import k-gpg.key
$ ssh-keygen -t ed25519 -C "[email protected]"
  • gpg 사이닝 실패할 경우
    • brew install pinentry-mac

nvim

$ brew install nvim
$ sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
       https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
  • jedi python 버전 에러 발생할 경우
    • pip install pynvim

Iterm2

zsh

$ brew install zsh

oh-my-zsh plugin

dotfiles

$ cat $(HOME)/.zshrc
[...]
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
[...]

$ echo ".dotfiles" >> .gitignore
$ git clone --bare [email protected]:onkwon/dotfiles.git $HOME/.dotfiles
$ dotfiles checkout
$ dotfiles config --local status.showUntrackedFiles no

tmux

$ brew install tmux

터미널 꾸미기

$ git clone --depth=1 https://github.com/romkatv/powerlevel10k.git .oh-my-zsh/themes/powerlevel10k

plugins

$ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
$ git clone https://github.com/zpm-zsh/tmux ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/tmux
$ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
$ git clone https://github.com/zdharma/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting
$ git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions

$ brew install fzf
$ $(brew --prefix)/opt/fzf/install
  • tmux plugin 을 설치하기 위해 <prefix> + I

Python

$ brew install pyenv
$ pyenv install 3.9.6
$ pyenv global 3.9.6
$ $(pyenv which python3) -m pip install virtualenvwrapper 

JAVA

기타

$ brew install coreutils

$ brew install ccls
$ brew install ctags cscope
$ brew install ripgrep
$ brew install tree
$ brew install gsed

$ brew install graphviz
$ brew install plantuml

$ brew install automake
$ brew install lcov
$ brew install sphinx-doc
$ brew install doxygen

$ brew install openocd

$ brew install htop
$ brew install lazygit
$ brew install ncdu

display

참고자료