Skip to content
Merged
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
16 changes: 0 additions & 16 deletions .commitlintrc.js

This file was deleted.

15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
indent_size = 4
max_line_length = 120

# YAML does not allow tabs for indentation.
[*.{yml,yaml}]
indent_style = space
indent_size = 2
Binary file added .github/assets/banner.en.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/assets/banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check

# Форматирование и линтеры. На main их вызывает release.yml, поэтому отдельный
# прогон там был бы дублем.
on:
push:
branches-ignore: [main]
pull_request:
workflow_call:
workflow_dispatch:

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
# Node, StyLua и selene ставятся версиями из mise.toml.
- uses: jdx/mise-action@v5
- run: npm ci
- run: npm run format:check
- run: npm run lint
18 changes: 18 additions & 0 deletions .github/workflows/pr-meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR meta

# Проставляет исполнителя PR и вешает метки по заголовку,
# логика живёт в aimuzov-projects/.github.
#
# `pull_request_target` нужен для того чтобы у PR от Renovate был токен
# с правом записи, при этом ничего из самого PR не чекаутится и не запускается.
on:
pull_request_target:
types: [opened, reopened, edited]

permissions:
pull-requests: write
issues: write

jobs:
meta:
uses: aimuzov-projects/.github/.github/workflows/pr-meta.yml@main
92 changes: 35 additions & 57 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,84 +1,61 @@
name: release
name: Release

# Мёрж в main только обновляет релизный PR, который ведёт release-please.
# Мёрж этого PR выпускает релиз, а сайт после него пересобирается со свежими доками.
on:
push:
branches: [main]
workflow_dispatch:
inputs:
increment:
description: Version increment (auto = from conventional commits)
type: choice
options: [auto, patch, minor, major]
default: auto
site_only:
description: Only rebuild the site, skip the release
description: Only redeploy the docs site, skip the release
type: boolean
default: false

permissions:
contents: write # push main/develop + tag, create the GitHub Release

concurrency:
group: release
cancel-in-progress: false

permissions:
contents: read

jobs:
check:
if: github.event_name == 'push'
uses: ./.github/workflows/check.yml

release:
if: ${{ !inputs.site_only }}
needs: check
if: github.event_name == 'push'
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
pull-requests: write
actions: write
outputs:
created: ${{ steps.release.outputs.created }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for conventional-changelog and tags
ref: main

- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm

- run: npm ci

- name: Configure git identity
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# A push to main already carries the release content; a manual run pulls in develop.
- name: Fast-forward main to develop
if: github.event_name == 'workflow_dispatch'
run: |
git fetch origin develop
git merge --ff-only origin/develop

- name: Run release-it
env:
GITHUB_TOKEN: ${{ github.token }}
INCREMENT: ${{ inputs.increment }}
run: |
if [ -z "$INCREMENT" ] || [ "$INCREMENT" = "auto" ]; then
npx release-it --ci
else
npx release-it "$INCREMENT" --ci
fi

- name: Sync develop with the release commit
run: git push origin main:develop
- id: release
uses: aimuzov-projects/infra-site-kit/release@v1

# A separate job so the site can be rebuilt on its own: a skipped release isn't a failure,
# while a failed one still keeps the site on the previous version.
# Сайт берёт доки из main на каждой сборке, так что после релиза достаточно
# передеплоить его последний тег.
site:
needs: release
if: ${{ !failure() && !cancelled() }}
if: >-
always() &&
(needs.release.outputs.created == 'true' || (github.event_name == 'workflow_dispatch' && inputs.site_only))
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# The site reads the version from develop at build time. GITHUB_TOKEN can't dispatch
# workflows in another repo, hence a fine-grained PAT with actions:write on lazyvimx/site.
- name: Rebuild the site
# GITHUB_TOKEN не запускает workflow в чужом репозитории, отсюда fine-grained PAT
# с actions:write и contents:read на lazyvimx/site.
- name: Redeploy the docs site
env:
GH_TOKEN: ${{ secrets.SITE_DEPLOY_TOKEN }}
run: |
# Stray whitespace in a pasted secret breaks the auth header, and gh gets a 401.
# Лишние пробелы во вставленном секрете ломают заголовок авторизации, и gh получает 401.
GH_TOKEN="$(printf '%s' "$GH_TOKEN" | tr -d '[:space:]')"
export GH_TOKEN

Expand All @@ -87,5 +64,6 @@ jobs:
exit 0
fi

echo "token length: ${#GH_TOKEN}"
gh workflow run deploy.yml -R lazyvimx/site
tag=$(gh release view -R lazyvimx/site --json tagName -q .tagName)
gh workflow run deploy.yml -R lazyvimx/site -f tag="$tag"
echo "lazyvimx/site $tag redeploys with the fresh docs"
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
package-lock.json
# Ведёт release-please.
CHANGELOG.md
# Фикстуры записи демо: сэмплы кода и профиль Neovim, их вид -- часть сценария.
docs/demo
.claude
.serena
26 changes: 0 additions & 26 deletions .release-it.js

This file was deleted.

3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.12.2"
}
54 changes: 32 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,28 +96,38 @@ Documentation improvements are always welcome:
### Local Development

1. Clone the repository:
```bash
git clone https://github.com/lazyvimx/nvim.git ~/.local/share/nvim/lazy/lazyvimx
```

```bash
git clone https://github.com/lazyvimx/nvim.git ~/.local/share/nvim/lazy/lazyvimx
```

2. Create a test configuration:
```lua
-- ~/.config/nvim-test/init.lua
local lazy_path = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
vim.opt.rtp:prepend(lazy_path)

require("lazy").setup({
spec = {
{ dir = "~/.local/share/nvim/lazy/lazyvimx", import = "lazyvimx.boot" },
{ import = "lazyvimx.extras.core.all" },
},
})
```

```lua
-- ~/.config/nvim-test/init.lua
local lazy_path = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
vim.opt.rtp:prepend(lazy_path)

require("lazy").setup({
spec = {
{ dir = "~/.local/share/nvim/lazy/lazyvimx", import = "lazyvimx.boot" },
{ import = "lazyvimx.extras.core.all" },
},
})
```

3. Test your changes:
```bash
NVIM_APPNAME=nvim-test nvim
```

```bash
NVIM_APPNAME=nvim-test nvim
```

4. Run the same checks as CI. Node, StyLua and selene come from [`mise.toml`](mise.toml):
```bash
mise install && npm ci
npm run format:check && npm run lint
```
`npm run format` fixes the formatting of Lua (StyLua) and Markdown, JSON and YAML (Prettier).

## Project Structure

Expand Down Expand Up @@ -289,10 +299,10 @@ refactor(util): simplify color blending function
## Pull Request Process

1. **Update documentation** for any user-facing changes
2. **Update CHANGELOG.md** under "Unreleased" section
2. **Leave CHANGELOG.md alone**: release-please writes it from the PR titles
3. **Update extras count** if you added/removed extras
4. **Test thoroughly** in a clean Neovim instance
5. **Ensure commits** follow conventional commits format
5. **Title the PR** in the conventional commits format, it becomes the changelog entry
6. **Link issues** that the PR addresses
7. **Request review** from maintainers
8. **Address feedback** promptly and professionally
Expand All @@ -311,10 +321,9 @@ Brief description of changes

## Checklist
- [ ] Documentation updated
- [ ] CHANGELOG.md updated
- [ ] Tested in clean environment
- [ ] Follows coding guidelines
- [ ] Commits follow conventional commits
- [ ] The PR title follows conventional commits

## Related Issues
Closes #<issue_number>
Expand All @@ -332,6 +341,7 @@ If you have questions:
## Recognition

Contributors will be recognized in:

- README.md contributors section
- Release notes
- Project documentation
Expand Down
Loading
Loading