Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A modern Zsh/tmux, Vim and Homebrew centric setup for macOS and Linux

NotificationsYou must be signed in to change notification settings

coderabbitai/dotfiles

Repository files navigation

CodeRabbit Neovim

Introduction

Welcome to CodeRabbit optimized development environment that is well integratedwith our stack.

Setup

We usechezmoi to manage CodeRabbit dotfiles in yourhome directory.

Automatic Setup

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/coderabbitai/dotfiles/master/sw/assets/executable_install.sh)"

Manual Setup

cd $HOMEchezmoi init git@github.com:coderabbitai/dotfiles.git# show diff of changes that will be madechezmoi diff# If you are happy with the changes, apply away!chezmoi apply -v

Please close and reopen the terminal to trigger first time install/updates.

Recommend usingGitHub CLI for authenticating with GitHub. Rungh auth login. Alternatively, addSSH key to your GitHub account.

Git setup

Username and local settings

Provide username and email address by creating.gitconfig_local e.g.

[user]  name = Harjot Gill  email = harjot@coderabbit.ai[github]   user = <github user name>   token = <personal access token>

You can generatepersonal access tokenfor GitHub to use HTTP API. Also, it's useful to add this token to your$HOME/.netrc file. Run -echo 'machine api.github.com login <user> password <token>' >> $HOME/.netrc

GitHub org cloning script

To clone CodeRabbit, run:gh_clone_all.sh coderabbitai $HOME/work. This stepis performed automatically on installation.

Git pull all repos script

To update all repos in a directory, run:pull_all.sh $HOME/work/coderabbitai.This step is performed automatically on auto-updates.

Preparing your terminal

  • Nerd fonts: Please enable a nerd font such asHack Nerd Font in yourterminal profile to see icons properly when usingnvim in terminal mode.
  • Terminal colors: See the section aboutcolors.

Homebrew

Homebrew is the default package manager for this environment. You can provideprivate packages by adding them to:$HOME/.brew_local

Autoupdates

This environment is set to autoupdate every 7 days by default. You can triggerautoupdates manually by callingautoupdate.zsh --force You can provide customautoupdate commands by adding them to:$HOME/.autoupdate_local.zsh

zshrc

You can provide additional zshrc settings by adding them to:$HOME/.zshrc_local

zsh

Features

  • Fuzzy menus: Fuzzy menus are available for command completion (pressTAB)menus and command history (press^r).
  • Vi mode: PressESC to enter ViNORMAL mode. Cool tip - while in normalmode, pressvv to switch to visual mode (it will opennvim editor) and inthat mode you can use GitHub Copilot to build sophisticated commands using AI!
  • Prompt flags: Typeyazpt_explain_git to understand the meaning of variousflags in the prompt.
  • Forgit: You can useforgit as an interactive frontend for various gitcommands. E.g. trygit forgit log.
  • iTerm2 integration: On macOS, please install iTerm2 shellintegration to usenice features such as navigating marks in prompt.

tmux

tmux Menutmux Fuzzy Menu

tmux sessions are automatically started as part of.zshrc execution. Youwill be shown an option to join an existing detached session if they exist,otherwise a new session will be created and attached to.

Features

  • Prefix:C-a orC-b
  • Fuzzy menu: PressC-a C-Space to access fuzzy menu for quick tmux managementand shortcuts to various commands.
  • tmux menu: PressF12 to access tmux session/window/pane management menu.
  • Nested tmux sessions (e.g. remote ssh): PressF1 to suspend/unsuspend localtmux.
  • Smug: Define and orchestrate tmux sessionswith smug. e.g. use smug to start/stop local dev Kubernetes cluster and so on.
  • Fuzzy search tmux terminal buffer: PressC-a C-/
  • Vi bindings are enabled in tmux copy mode
  • Facebook PathPicker: PressC-a C-P to select any line from scrollback buffer(e.g. git status) and use those in another command.
  • Urlview: PressC-a C-U to select any url in scrollback buffer and open inbrowser.

Neovim

This environment is highly tuned towards providing a modern neovim/vim setup fordevelopment using modern languages such as Golang, Typescript etc.

Fuzzy Menu

IDE

vimrc

You can provide additionalvimrc settings by adding them to:$HOME/.vimrc_local. You can also useFuzzyMenu (<space><space>) to tweakand persist local settings. In addition, you can provide additional vim pluginsby adding them to$HOME/.vimrc_plugins.

Severalcolorschemes are bundled andgruvbox is chosen by default. You canoverridecolorscheme by providinglet colorscheme = <colorscheme> in your.vimrc_local file.

See.vimrc file for availablecolorschemes. Also see~/.config/nvim/init.vim for Neovim specific settings.

Discoverability of commands and plugins

  • Landing page for new tabs contains several useful links that help withdiscoverability.
  • Press<space><space> (double space) orShift + LeftMouse click to open acontextual FuzzyMenu for the word under cursor or selection.

AI-based autocompletion

  • GitHub Copilot - Type:Copilot setup in Neovim to set up.
  • CodeGPT - Just highlight the code and press<space><space> to see CodeGPToptions in the FuzzyMenu. You must provideOPENAI_API_KEY environmentvariable in your.zshrc_local to use this feature.

LanguageTool

If you have LanguageTool Premium, you can provideLANGTOOL_HTTP_URI,LANGTOOL_USERNAME andLANGTOOL_API_KEY environment variables to use thelanguage server in Neovim.

Colors

Unlikenvim which allows setting themes easily via.vimrc_local, colorthemes for terminal interface are spread across multiple settings.

  • Terminal theme -
    • macOS: For iTerm2, the option will be provided to install bundled profilethat contains font/color settings. If you do not wish to install theprofile, then the colors will be set via terminal escape codes unlessSET_TERMINAL_COLORS is set tofalse in your.zshrc_local.
    • Linux: Colors will be set automatically using terminal escape codes unlessSET_TERMINAL_COLORS is set tofalse in your.zshrc_local.Alternatively, you can install default color profile using$HOME/sw/assets/install_gruvbox.sh. Make sure to setSET_TERMINAL_COLORStofalse in your.zshrc_local if you would like to use terminal's colorprofiles.
  • tmux theme - See.tmux.conf.settings for example configuration and overrideit in your personal.tmux.conf_local file. The tmux theme configures thetmux status line and not the terminal itself.
  • bat theme (cat replacement) - Environment variableBAT_THEME sets the theme.Seebat --list-themes to get the list. You can override this theme in your.zshrc_local file. Bat is used extensively for fzf previews, git pager(delta), less command filter and so on.
  • FZF colors - Get and source color schemes frombase16-fzf in your$HOME/.zshrc_local.
  • LS_COLORS - We usevivid to set thethemes. Runvivid themes to get the list. You can override this theme inyour.zshrc_local file.
  • Git pager - See.gitconfig_themes to see the available themes. You canoverride them in your local.gitconfig_local.
  • Fast Syntax Highlighting (zsh) - You can runfast-theme -l to get the list.To set the theme, first, overrideFAST_WORK_DIR environment variable in your.zshrc and point it to$HOME/.config/fsh_local. Next, runfast-theme <theme> to switch the theme.

Note: Currently all these settings are configured to matchgruvbox-dark colorpalette. But it's pretty easy to override them to matchonedark orNord

Bonus:

  • Slack Gruvbox - Paste this in your DM to Slackbot and click theSwitch sidebar theme button. gruvbox dark #282828,#3c3836,#ebdbb2,#1d2021,#3e313c,#ebdbb2,#689d6a,#fb4934

Managing*_local override files

You can usevcsh utility to version localfiles and sync them across machines.

About

A modern Zsh/tmux, Vim and Homebrew centric setup for macOS and Linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp