|
| 1 | +.PHONY: help pr-description mr-description github gitlab \ |
| 2 | + lint format check validate clean docs update-readme \ |
| 3 | + install test health |
| 4 | + |
| 5 | +# Default target |
| 6 | +help: |
| 7 | + @echo "Neovim Configuration - Available Commands" |
| 8 | + @echo "" |
| 9 | + @echo "PR/MR Description:" |
| 10 | + @echo " make pr-description Generate GitHub PR description" |
| 11 | + @echo " make mr-description Generate GitLab MR description" |
| 12 | + @echo "" |
| 13 | + @echo "Code Quality:" |
| 14 | + @echo " make lint Run luacheck linter" |
| 15 | + @echo " make format Format Lua files with stylua" |
| 16 | + @echo " make check Run lint + format check (no write)" |
| 17 | + @echo " make validate Run full config validation" |
| 18 | + @echo "" |
| 19 | + @echo "Documentation:" |
| 20 | + @echo " make docs Generate plugin documentation" |
| 21 | + @echo " make update-readme Update README with plugin list" |
| 22 | + @echo "" |
| 23 | + @echo "Maintenance:" |
| 24 | + @echo " make clean Remove cache and generated files" |
| 25 | + @echo " make health Run Neovim health checks" |
| 26 | + @echo " make test Test Neovim startup" |
| 27 | + |
| 28 | +#------------------------------------------------------------------------------ |
| 29 | +# PR/MR Description |
| 30 | +#------------------------------------------------------------------------------ |
| 31 | + |
| 32 | +pr-description: |
| 33 | + @nvim --headless -c "lua print(require('utils.pr_description').generate_description())" -c "qa" |
| 34 | + |
| 35 | +mr-description: |
| 36 | + @nvim --headless -c "lua print(require('utils.pr_description').generate_description({is_gitlab=true}))" -c "qa" |
| 37 | + |
| 38 | +# Aliases for backwards compatibility |
| 39 | +github: pr-description |
| 40 | +gitlab: mr-description |
| 41 | + |
| 42 | +#------------------------------------------------------------------------------ |
| 43 | +# Code Quality |
| 44 | +#------------------------------------------------------------------------------ |
| 45 | + |
| 46 | +lint: |
| 47 | + @echo "Running luacheck..." |
| 48 | + @luacheck lua/ --config .luacheckrc |
| 49 | + |
| 50 | +format: |
| 51 | + @echo "Formatting with stylua..." |
| 52 | + @stylua --config-path stylua.toml lua/ |
| 53 | + |
| 54 | +format-check: |
| 55 | + @stylua --config-path stylua.toml --check lua/ |
| 56 | + |
| 57 | +check: lint format-check |
| 58 | + @echo "All checks passed!" |
| 59 | + |
| 60 | +validate: |
| 61 | + @./scripts/validate.sh |
| 62 | + |
| 63 | +#------------------------------------------------------------------------------ |
| 64 | +# Documentation |
| 65 | +#------------------------------------------------------------------------------ |
| 66 | + |
| 67 | +docs: |
| 68 | + @./scripts/generate-docs.sh |
| 69 | + |
| 70 | +update-readme: |
| 71 | + @./scripts/update-readme.sh |
| 72 | + |
| 73 | +#------------------------------------------------------------------------------ |
| 74 | +# Maintenance |
| 75 | +#------------------------------------------------------------------------------ |
| 76 | + |
| 77 | +clean: |
| 78 | + @echo "Cleaning cache files..." |
| 79 | + @rm -rf .aider.tags.cache.v4/ |
| 80 | + @rm -rf .elixir-tools/ |
| 81 | + @rm -f lazy-lock.json.bak |
| 82 | + @echo "Done!" |
| 83 | + |
| 84 | +health: |
| 85 | + @nvim --headless -c "checkhealth" -c "qa" |
| 86 | + |
| 87 | +test: |
| 88 | + @echo "Testing Neovim startup..." |
| 89 | + @nvim --headless -c "lua print('Startup OK - ' .. #require('lazy').plugins() .. ' plugins loaded')" -c "qa" |
0 commit comments