Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": false,
"singleQuote": false,
"trailingComma": "none",
"printWidth": 100,
"tabWidth": 2,
"proseWrap": "preserve"
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "foxundermoon.shell-format", "timonwong.shellcheck"]
}
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"shellformat.flag": "-i 2"
}
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## Repository Overview

This is a dotfiles repository managed by **chezmoi**. Chezmoi uses special file naming conventions:

- `dot_` prefix → `.` (e.g., `dot_zshrc` → `~/.zshrc`)
- `.tmpl` suffix → Template files processed with variables (e.g., `dot_gitconfig.tmpl`)

Expand Down
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,48 @@
## 📝 About

This is nyatinte's private dotfiles repository, managed with [chezmoi](https://www.chezmoi.io/) for consistent configuration across multiple machines.

## 🚀 Setup

### Prerequisites

Install the following tools:

```bash
# Install npm dependencies (Prettier, concurrently, lefthook)
npm install

# Install shfmt (shell script formatter)
go install mvdan.cc/sh/v3/cmd/shfmt@latest

# Install shellcheck (shell script linter)
# macOS
brew install shellcheck

# Ubuntu/Debian
apt-get install shellcheck

# Other: https://github.com/koalaman/shellcheck#installing
```

### VSCode Extensions

Install recommended extensions for automatic formatting:

- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- [shell-format](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format)
- [ShellCheck](https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck)

## 🔧 Usage

```bash
# Format all files
npm run format

# Check formatting (CI)
npm run format:check

# Format specific types
npm run format:prettier # JSON, YAML, Markdown
npm run format:shell # Shell scripts
```
2 changes: 1 addition & 1 deletion home/dot_claude/commands/create-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ argument-hint: "[オプション: PR作成時の追加指示]"
- ベースブランチをもとにPRを作成:

```bash
gh pr create --base <ベースブランチ> --title "$(head -n1 PR.md)" --body "$(tail -n+2 PR.md)"
gh pr create --base "$(head -n1 PR.md)" --body "$(tail -n+2 PR.md)" < ベースブランチ > --title
```

- PR URLを表示
Expand Down
10 changes: 5 additions & 5 deletions home/dot_claude/commands/draft-pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ PRに含めるコミットがあるか確認
### 2. **既存のPR.mdの確認**

`PR.md`が既に存在する場合:
その内容を読み取る
ユーザーに上書きするか編集するか尋ねる(AskUserQuestionを使用)
既存のものを保持したい場合は終了
その内容を読み取る
ユーザーに上書きするか編集するか尋ねる(AskUserQuestionを使用)
既存のものを保持したい場合は終了

- `PR.md`が存在しない場合:
- 生成を進める
Expand All @@ -41,7 +41,7 @@ PRに含めるコミットがあるか確認

- ユーザーの過去のPRを検索: `gh pr list --author @me --state merged --limit 10`
- ユーザーに過去のPRがある場合:
最近の2-3件のPRの詳細を取得
最近の2-3件のPRの詳細を取得

- 分析: タイトル形式、説明構造、使用言語
- PR説明の書き方のパターンを記録
Expand All @@ -55,7 +55,7 @@ PRテンプレートを確認: `.github/pull_request_template.md`または類似
- `git log <ベースブランチ>..HEAD --pretty=format:"%s"`
- ファイル変更を取得:

`git diff <ベースブランチ>..HEAD --stat`
`git diff <ベースブランチ>..HEAD --stat`

- `git diff <ベースブランチ>..HEAD`(詳細な変更用)

Expand Down
2 changes: 1 addition & 1 deletion home/dot_zsh.d/dev-tools.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ export NI_DEFAULT_AGENT="pnpm"
export NI_GLOBAL_AGENT="pnpm"

# Code editor
export VISUAL="code"
export VISUAL="code"
8 changes: 4 additions & 4 deletions home/dot_zsh.d/fzf.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export FZF_CTRL_T_OPTS="

# Ctrl+R - History Search
function fzf-select-history() {
BUFFER=$(history -n -r 1 | fzf --query "$LBUFFER")
CURSOR=$#BUFFER
zle reset-prompt
BUFFER=$(history -n -r 1 | fzf --query "$LBUFFER")
CURSOR=$#BUFFER
zle reset-prompt
}
zle -N fzf-select-history
bindkey '^r' fzf-select-history
bindkey '^r' fzf-select-history
17 changes: 12 additions & 5 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ pre-push:
exit 1
fi

# pre-commit:
# TODO: formatting checks
# parallel: true
# jobs:
# - run:
pre-commit:
parallel: true
commands:
prettier-check:
glob: "*.{json,yml,yaml,md}"
run: npm run lint:prettier -- {staged_files}
shfmt-check:
glob: "*.{sh,zsh,bash}"
run: npm run lint:shfmt -- {staged_files}
shellcheck:
glob: "*.{sh,zsh,bash}"
run: npm run lint:shellcheck -- {staged_files} || echo "⚠️ shellcheck not found, skipping lint check"
Loading