These dotfiles are configured to set up a productive development environment, with a strong focus on Node.js development using pnpm and seamless integration with GitHub Codespaces and VS Code.
- Shell Power:
- Zsh with Oh My Zsh for a powerful and customizable shell experience.
- Powerlevel10k theme for a visually appealing and informative prompt.
- Plugins like
zsh-autosuggestionsandzsh-syntax-highlightingfor enhanced productivity. - Automatic Nerd Font Installation: Attempts to install JetBrainsMono Nerd Font automatically on Linux systems (including Codespaces) if it's not already present. Requires
wget,unzip, andfontconfig(forfc-cacheandfc-list).
- Node.js Ready:
- nvm (Node Version Manager): Easily switch between Node.js versions. Loaded automatically by
.zshrc. - pnpm: Set up as the primary package manager, enabled via Corepack.
- Helpful aliases for
pnpm,npm, andyarncommands in.zshrc. - Default
NODE_ENVset todevelopment.
- nvm (Node Version Manager): Easily switch between Node.js versions. Loaded automatically by
- VS Code Integration (Codespaces & Local):
- Shared Settings (
.vscode/settings.json):- Default formatter: Prettier (formats on save).
- ESLint integration for linting and fixing.
- Default terminal set to
zsh. pnpmconfigured as the workspace package manager.
- Recommended Extensions (
.vscode/extensions.json):- Essential extensions for JavaScript/TypeScript, linting/formatting (ESLint, Prettier), testing (Jest), Docker, Git (GitLens), GitHub Copilot, and more.
- Shared Settings (
- Git Enhancements:
- Sensible defaults in
.gitconfig(e.g.,pull.rebase = true). - A rich set of useful Git aliases.
- Global
.gitignorefor common temporary and OS-specific files.
- Sensible defaults in
The install.sh script handles the setup process. It will:
- Install Oh My Zsh and selected plugins (Powerlevel10k, autosuggestions, syntax highlighting).
- Enable Corepack and ensure
pnpm(latest) is available. - Includes a default Powerlevel10k configuration (
.p10k.zsh). - Attempts to download and install the JetBrainsMono Nerd Font if you're on Linux and have
wget,unzip, andfontconfig(forfc-cache/fc-list) installed. It will try to detect if the font is already present before downloading. - Copy the dotfiles (
.zshrc,.gitconfig,.p10k.zsh, etc.) to your home directory. - Copy the VS Code settings (
.vscode/) to~/.vscode/. - The script is now more verbose, providing feedback on its progress.
- It detects if it's running in GitHub Codespaces to adjust behavior (e.g., non-interactive).
- Conditional Copying for
.p10k.zsh:- For local setups, if an existing
~/.p10k.zshis found, it will be backed up to~/.p10k.zsh.bakbefore the new configuration is copied. - In GitHub Codespaces, the repository's
.p10k.zshwill overwrite any existing version in the Codespace home directory to ensure consistency.
- For local setups, if an existing
git clone https://github.com/Justinjdaniel/dotfiles.git ~/dotfiles # Clone to ~/dotfiles
cd ~/dotfiles
./install.shAfter installation, restart your terminal or source your ~/.zshrc file (e.g., source ~/.zshrc).
cd ~/dotfiles # Or wherever you cloned it
git pull # Get the latest changes
./install.sh -u # The -u flag might be for specific update logic in your script, or just re-runs relevant parts.Review the install.sh script if the -u flag has specific behavior you rely on. Currently, it skips dependency installation.
- GitHub Codespaces: The settings and extensions defined in the
.vscode/directory of this repository will be automatically applied when you open this repository in a Codespace. Theinstall.shscript also copies these to~/.vscode/within the Codespace to ensure user-level configurations are aligned if you open a terminal without the workspace context or for general consistency. - Local VS Code: For local VS Code setups, the
install.shscript will copy the contents of the repository's.vscode/directory to~/.vscode/. However, to protect your existing local customizations, if~/.vscode/settings.jsonalready exists, it will not be overwritten. Other files likeextensions.jsonwill still be copied if present in the repository. You might need to restart VS Code to see all changes.
- Zsh & Oh My Zsh:
- Add more plugins: Oh My Zsh Plugins, Zsh Users, Awesome Zsh Plugins
- Customize aliases and functions in your
~/.zshrc.
- Powerlevel10k: A default Powerlevel10k configuration (
.p10k.zsh) based on the 'Lean' style is included and will be set up by theinstall.shscript. You can further customize your prompt by runningp10k configure(which will guide you through options and overwrite the existing~/.p10k.zsh) or by manually editing your~/.p10k.zshfile. - VS Code: Modify settings in
~/.vscode/settings.jsonor directly in the VS Code settings UI. - Fonts: The
install.shscript attempts to automatically install JetBrainsMono Nerd Font on Linux systems to ensure a great out-of-the-box experience with Powerlevel10k. If you prefer a different Nerd Font or are on a non-Linux system, you can install one manually from resources like Nerd Fonts.