This repository contains configuration files for vim, tmux, git, and zsh. Copy each of the files to the home directory to get started.
Check here to view cheatsheets that document usage of the customizations.
Some additional setup and configuration is required.
Download and run the ohmyzsh
script.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Install ctags so the included hooks can generate ctags automatically on different git actions.
brew install ctags
Install tmux.
brew install tmux
Install the tmux package manager.
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
Reload the tmux environment to source TPM.
tmux source ~/.tmux.conf
Install the plugins by pressing prefix
+ I
.
Create a directory for the temporary and backup files.
mkdir -p ~/.vim/backups
mkdir -p ~/.vim/tmp
Create a directory for the plugins.
mkdir -p ~/.vim/pack/vendor/start
Navigate to the newly created directory and clone the following repositories there. Follow the installation instructions for each plugin:
- auto-pairs: Insert or delete brackets, parens, quotes in pair.
- coc.nvim: LSP, syntax highlighting, linting, etc..
- codeium.vim: Codeium integration.
- dash.vim: Dash integration.
- dispatch: Asynchronous build and test dispatcher.
- fugitive: Git integration.
- tender.vim: Color scheme.
- vim-ags: Silver searcher plugin.
- vim-airline: Status/tabline.
- vim-gitgutter: Show git diff in the sign column.
- vim-eunuch: Wrapper for shell commands.
- vim-javascript: Improved JS syntax highlighting and indentation.
- vim-jsx-pretty: JSX syntax highlighting.
- vim-prettier: Wrapper for prettier.
- vim-rails: Rails integration.
- vim-slime: Send text from the editor to a live REPL.
- vim-test: Run specs/tests from within the editor.
Create the paste file used by vim-slime
.
touch ~/.slime_paste
Ensure the_silver_searcher
is installed so that vim-ags
can utilize it for search.
brew install the_silver_searcher
Setup codeium by entering the following command from within vim and following the instructions.
:Codeium Auth
To configure coc.nvim, create coc-settings.json
in the ~/.vim
directory and add the following configuration:
{
"solargraph.autoformat": false,
"solargraph.diagnostics": true,
"solargraph.formatting": true,
"solargraph.hover": true,
"solargraph.logLevel": "debug"
}
Then, open vim and install the coc.nvim extensions:
:CocInstall coc-json coc-html coc-eslint coc-tsserver coc-solargraph coc-css
Install the solargraph
and solargraph-rails
gems globally. The configuration file for solargraph
can be generated in a project with command:
solargraph config
Here's an example config that works nicely:
include:
- "**/*.rb"
exclude:
- spec/**/*
- test/**/*
- vendor/**/*
- ".bundle/**/*"
require: []
domains: []
reporters:
- rubocop
require_paths: []
plugins:
- solargraph-rails
max_files: 5000
The dash.vim plugin provides an integration with Dash. Install Dash by downloading it from the official website and then applying the license file.
Download the following docsets by usings the Dash > Settings > Downloads interface:
- Ruby 3
- Ruby on Rails 7
- Sass
- Vim
- Redis
- React
- PostgreSQL
- JavaScript
- Apple API Reference
- C
- Common Lisp
- Font Awesome
- Git
- Ruby strftime
- Rspec Expectations
- Rails Migrations CLI
- Vim
It may be necessary to execute certain commands from within a docker context. One example of this is dispatching tests with vim-test.
if filereadable("docker-compose.yml")
let test#ruby#rspec#executable = 'docker-compose exec app bundle exec rspec'
else
let test#ruby#rspec#executable = 'bundle exec rspec'
endif