Skip to content

Commit 8385415

Browse files
authored
Merge pull request #8 from barrettruth/chore/add-project-configs
chore: add project configs
2 parents af0fd7c + 76506cd commit 8385415

24 files changed

Lines changed: 516 additions & 130 deletions

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
insert_final_newline = true
5+
charset = utf-8
6+
7+
[*.lua]
8+
indent_style = space
9+
indent_size = 2
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Bug Report
2+
description: Report a bug
3+
title: "bug: "
4+
labels: [bug]
5+
body:
6+
- type: checkboxes
7+
attributes:
8+
label: Prerequisites
9+
options:
10+
- label: I have searched [existing
11+
issues](https://github.com/barrettruth/http-codes.nvim/issues)
12+
required: true
13+
- label: I have updated to the latest version
14+
required: true
15+
16+
- type: textarea
17+
attributes:
18+
label: "Neovim version"
19+
description: "Output of `nvim --version`"
20+
render: text
21+
validations:
22+
required: true
23+
24+
- type: input
25+
attributes:
26+
label: "Operating system"
27+
placeholder: "e.g. Arch Linux, macOS 15, Ubuntu 24.04"
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
attributes:
33+
label: Description
34+
description: What happened? What did you expect?
35+
validations:
36+
required: true
37+
38+
- type: textarea
39+
attributes:
40+
label: Steps to reproduce
41+
description: Minimal steps to trigger the bug
42+
value: |
43+
1.
44+
2.
45+
3.
46+
validations:
47+
required: true
48+
49+
- type: textarea
50+
attributes:
51+
label: "Health check"
52+
description: "Output of `:checkhealth http-codes`"
53+
render: text
54+
55+
- type: textarea
56+
attributes:
57+
label: Minimal reproduction
58+
description: |
59+
Save the script below as `repro.lua`, edit if needed, and run:
60+
```
61+
nvim -u repro.lua
62+
```
63+
Confirm the bug reproduces with this config before submitting.
64+
render: lua
65+
value: |
66+
vim.env.LAZY_STDPATH = '.repro'
67+
load(vim.fn.system('curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua'))()
68+
require('lazy.nvim').setup({
69+
spec = {
70+
{
71+
'barrett-ruth/http-codes.nvim',
72+
opts = {},
73+
},
74+
},
75+
})
76+
validations:
77+
required: true

.github/ISSUE_TEMPLATE/config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Questions
4+
url: https://github.com/barrettruth/http-codes.nvim/discussions
5+
about: Ask questions and discuss ideas
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Feature Request
2+
description: Suggest a feature
3+
title: "feat: "
4+
labels: [enhancement]
5+
body:
6+
- type: checkboxes
7+
attributes:
8+
label: Prerequisites
9+
options:
10+
- label: I have searched [existing
11+
issues](https://github.com/barrettruth/http-codes.nvim/issues)
12+
required: true
13+
14+
- type: textarea
15+
attributes:
16+
label: Problem
17+
description: What problem does this solve?
18+
validations:
19+
required: true
20+
21+
- type: textarea
22+
attributes:
23+
label: Proposed solution
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
attributes:
29+
label: Alternatives considered

.github/workflows/ci.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: ci
2+
on:
3+
workflow_call:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
changes:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
lua: ${{ steps.changes.outputs.lua }}
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: dorny/paths-filter@v3
17+
id: changes
18+
with:
19+
filters: |
20+
lua:
21+
- 'lua/**'
22+
- 'plugin/**'
23+
- '*.lua'
24+
- '.luarc.json'
25+
- 'stylua.toml'
26+
- 'selene.toml'
27+
28+
lua-format:
29+
runs-on: ubuntu-latest
30+
needs: changes
31+
if: ${{ needs.changes.outputs.lua == 'true' }}
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: JohnnyMorganz/stylua-action@v4
35+
with:
36+
token: ${{ secrets.GITHUB_TOKEN }}
37+
version: 2.1.0
38+
args: --check .
39+
40+
lua-lint:
41+
runs-on: ubuntu-latest
42+
needs: changes
43+
if: ${{ needs.changes.outputs.lua == 'true' }}
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: NTBBloodbath/selene-action@v1.0.0
47+
with:
48+
token: ${{ secrets.GITHUB_TOKEN }}
49+
args: --display-style quiet .
50+
51+
lua-typecheck:
52+
runs-on: ubuntu-latest
53+
needs: changes
54+
if: ${{ needs.changes.outputs.lua == 'true' }}
55+
steps:
56+
- uses: actions/checkout@v4
57+
- uses: mrcjkb/lua-typecheck-action@v0
58+
with:
59+
checklevel: Warning
60+
directories: lua
61+
configpath: .luarc.json

.github/workflows/luarocks.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: luarocks
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
ci:
10+
uses: ./.github/workflows/ci.yaml
11+
12+
publish:
13+
needs: ci
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: nvim-neorocks/luarocks-tag-release@v7
20+
env:
21+
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}

.github/workflows/quality.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: quality
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
changes:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
lua: ${{ steps.changes.outputs.lua }}
14+
markdown: ${{ steps.changes.outputs.markdown }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: dorny/paths-filter@v3
18+
id: changes
19+
with:
20+
filters: |
21+
lua:
22+
- 'lua/**'
23+
- 'plugin/**'
24+
- '*.lua'
25+
- '.luarc.json'
26+
- '*.toml'
27+
markdown:
28+
- '*.md'
29+
- 'doc/**/*.md'
30+
31+
lua-format:
32+
name: Lua Format Check
33+
runs-on: ubuntu-latest
34+
needs: changes
35+
if: ${{ needs.changes.outputs.lua == 'true' }}
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: JohnnyMorganz/stylua-action@v4
39+
with:
40+
token: ${{ secrets.GITHUB_TOKEN }}
41+
version: 2.1.0
42+
args: --check .
43+
44+
lua-lint:
45+
name: Lua Lint Check
46+
runs-on: ubuntu-latest
47+
needs: changes
48+
if: ${{ needs.changes.outputs.lua == 'true' }}
49+
steps:
50+
- uses: actions/checkout@v4
51+
- name: Lint with Selene
52+
uses: NTBBloodbath/selene-action@v1.0.0
53+
with:
54+
token: ${{ secrets.GITHUB_TOKEN }}
55+
args: --display-style quiet .
56+
57+
lua-typecheck:
58+
name: Lua Type Check
59+
runs-on: ubuntu-latest
60+
needs: changes
61+
if: ${{ needs.changes.outputs.lua == 'true' }}
62+
steps:
63+
- uses: actions/checkout@v4
64+
- name: Run Lua LS Type Check
65+
uses: mrcjkb/lua-typecheck-action@v0
66+
with:
67+
checklevel: Warning
68+
directories: lua
69+
configpath: .luarc.json
70+
71+
markdown-format:
72+
name: Markdown Format Check
73+
runs-on: ubuntu-latest
74+
needs: changes
75+
if: ${{ needs.changes.outputs.markdown == 'true' }}
76+
steps:
77+
- uses: actions/checkout@v4
78+
- name: Setup pnpm
79+
uses: pnpm/action-setup@v4
80+
with:
81+
version: 8
82+
- name: Setup Node.js
83+
uses: actions/setup-node@v4
84+
with:
85+
node-version: "20"
86+
- name: Install prettier
87+
run: pnpm add -g prettier@3.1.0
88+
- name: Check markdown formatting with prettier
89+
run: prettier --check .

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
doc/tags
2+
.*cache*
3+
CLAUDE.md
4+
.claude/

.luarc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"runtime.version": "Lua 5.1",
3+
"runtime.path": ["lua/?.lua", "lua/?/init.lua"],
4+
"diagnostics.globals": ["vim", "jit"],
5+
"workspace.library": ["$VIMRUNTIME/lua", "${3rd}/luv/library"],
6+
"workspace.checkThirdParty": false,
7+
"completion.callSnippet": "Replace"
8+
}

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
minimum_pre_commit_version: "3.5.0"
2+
3+
repos:
4+
- repo: https://github.com/JohnnyMorganz/StyLua
5+
rev: v2.3.1
6+
hooks:
7+
- id: stylua-github
8+
name: stylua (Lua formatter)
9+
files: \.lua$
10+
pass_filenames: true
11+
12+
- repo: https://github.com/pre-commit/mirrors-prettier
13+
rev: v4.0.0-alpha.8
14+
hooks:
15+
- id: prettier
16+
name: prettier
17+
files: \.(md|toml|ya?ml|sh)$

0 commit comments

Comments
 (0)