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
19 changes: 19 additions & 0 deletions .github/link-check-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"timeout": "8s",
"retryOn429": true,
"retryCount": 2,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206],
"ignorePatterns": [
{
"pattern": "^https://github.com/[^/]+/[^/]+$",
"comment": "Allow main GitHub repo pages without files"
},
{
"pattern": "^mailto:",
"comment": "Skip email links"
}
],
"replacementPatterns": [],
"httpHeaders": []
}
138 changes: 138 additions & 0 deletions .github/workflows/docs-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: Documentation Validation

on:
push:
branches: [main, modernize-2026]
paths:
- "*.md"
- ".github/workflows/docs-validation.yml"
pull_request:
branches: [main]
paths:
- "*.md"

jobs:
markdown:
name: Markdown Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install markdownlint
run: npm install -g markdownlint-cli

- name: Lint Markdown
run: |
echo "Linting markdown files..."
markdownlint '*.md'
echo "✓ All markdown files passed linting"

links:
name: Link Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install markdown-link-check
run: npm install -g markdown-link-check

- name: Check Links
run: |
echo "Checking internal links..."
FAILED=0
for file in *.md; do
echo "Checking $file..."
if ! markdown-link-check -q -c .github/link-check-config.json "$file"; then
FAILED=1
fi
done
Comment on lines +21 to +48
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both markdownlint and markdown-link-check are run with || true, so the workflow will succeed even when linting/link checks fail. If this workflow is meant to validate docs, remove the unconditional success handling (or at least gate it behind an input/flag) so broken links and markdown issues are caught in CI.

Copilot uses AI. Check for mistakes.
if [ $FAILED -eq 1 ]; then
echo "❌ Some links are broken"
exit 1
fi

files:
name: File Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check required files exist
run: |
echo "Checking for required documentation files..."

files=(
"README.md"
"CHANGELOG.md"
"CONTRIBUTING.md"
"MODERNIZATION_2026.md"
"PLUGIN_AUDIT_2026.md"
)

for file in "${files[@]}"; do
if [ ! -f "$file" ]; then
echo "❌ Missing required file: $file"
exit 1
fi
echo "✓ $file exists"
done

- name: Check README freshness
run: |
echo "Verifying README is current..."

# Check that README mentions 0.5 (current version)
grep -q "0.5\|2026" README.md || echo "⚠️ README may need version update"

# Check that README mentions 0.10.0 requirement
grep -q "0.10" README.md || echo "⚠️ README may need Neovim version update"

echo "✓ README appears current"

- name: Check CHANGELOG updated
run: |
echo "Verifying CHANGELOG is up-to-date..."

# Check that CHANGELOG has recent entries
grep -q "2026" CHANGELOG.md || echo "⚠️ CHANGELOG may need updating"

echo "✓ CHANGELOG exists and appears current"

structure:
name: Project Structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Verify directory structure
run: |
echo "Checking project structure..."

dirs=(
"lua"
"lua/config"
"lua/plugins"
"lua/plugins/lsp"
".github/workflows"
)

for dir in "${dirs[@]}"; do
if [ ! -d "$dir" ]; then
echo "❌ Missing directory: $dir"
exit 1
fi
echo "✓ $dir exists"
done

- name: Count plugins
run: |
count=$(find lua/plugins -name "*.lua" -type f | wc -l)
echo "Total plugin files: $count"

if [ "$count" -lt 40 ]; then
echo "⚠️ Plugin count low: $count"
elif [ "$count" -gt 60 ]; then
echo "⚠️ Plugin count high: $count (target: 50-55)"
else
echo "✓ Plugin count is good: $count"
fi
108 changes: 108 additions & 0 deletions .github/workflows/lint-and-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Lint & Format Check

on:
push:
branches: [main, modernize-2026]
paths:
- "lua/**"
- "init.lua"
- ".stylua.toml"
- ".luacheckrc"
- ".github/workflows/lint-and-format.yml"
pull_request:
branches: [main]
paths:
- "lua/**"
- "init.lua"

jobs:
lint:
name: Luacheck Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Lua
uses: hishamhm/gh-actions-lua@v10
with:
luaVersion: 5.1

- name: Install Luarocks
uses: hishamhm/gh-actions-luarocks@v4

- name: Install Luacheck
run: luarocks install luacheck

- name: Run Luacheck
run: luacheck lua/

format:
name: Stylua Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@1.75

- name: Install Stylua
run: cargo install stylua --locked

- name: Check Lua formatting
run: stylua --check lua/ init.lua
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabling stylua --check on lua/ and init.lua will cause CI to fail unless the existing codebase is formatted to match the new .stylua.toml settings (e.g., files currently contain tabs/indent inconsistencies). Either run Stylua and commit the formatting changes as part of this PR, or adjust the workflow to apply formatting (and fail if it produces diffs) so contributors get actionable output.

Suggested change
run: stylua --check lua/ init.lua
run: |
stylua lua/ init.lua
if ! git diff --quiet; then
echo "::error::StyLua formatting changes detected. Please run 'stylua lua/ init.lua' locally and commit the results."
git diff
exit 1
fi

Copilot uses AI. Check for mistakes.

plugin-load:
name: Plugin Loading Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: v0.10.0

- name: Check Neovim Version
run: nvim --version

- name: Verify Plugin Files Syntax
run: |
for file in lua/plugins/*.lua lua/config/*.lua; do
nvim --headless -c "exec 'source $file' | exec 'quit'" 2>&1 | grep -i 'error' && echo "Syntax error in $file" && exit 1
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This syntax-check loop will fail on the first non-error because GitHub Actions runs bash with -e -o pipefail: grep returns 1 when it finds no matches, causing the step to exit. Restructure this to only fail when an error is detected (e.g., wrap the nvim output check in an if ...; then ...; fi, or make the grep non-fatal).

Suggested change
nvim --headless -c "exec 'source $file' | exec 'quit'" 2>&1 | grep -i 'error' && echo "Syntax error in $file" && exit 1
output=$(nvim --headless -c "exec 'source $file' | exec 'quit'" 2>&1 || true)
if echo "$output" | grep -qi 'error'; then
echo "Syntax error in $file"
echo "$output"
exit 1
fi

Copilot uses AI. Check for mistakes.
done
Comment on lines +71 to +73
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Verify Plugin Files Syntax" step pipes Neovim output into grep -i 'error' without enabling pipefail and without checking Neovim's exit status. This can miss real failures (e.g., non-zero exit with messages that don't include the substring "error") and can also fail spuriously if output contains "error" in a non-fatal context. Consider running Neovim with a command that directly loads the file and rely on the process exit code (and/or set set -euo pipefail for the loop).

Suggested change
for file in lua/plugins/*.lua lua/config/*.lua; do
nvim --headless -c "exec 'source $file' | exec 'quit'" 2>&1 | grep -i 'error' && echo "Syntax error in $file" && exit 1
done
set -euo pipefail
status=0
for file in lua/plugins/*.lua lua/config/*.lua; do
echo "Checking $file"
if ! nvim --headless -c "exec 'source $file' | qa" >/dev/null 2>&1; then
echo "Syntax error in $file"
status=1
fi
done
if [ "$status" -ne 0 ]; then
exit "$status"
fi

Copilot uses AI. Check for mistakes.
echo "✓ All Lua files have valid syntax"

analyze:
name: Code Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check for deprecated APIs
run: |
echo "Checking for deprecated vim.loop usage..."
if grep -r "vim\.loop" lua/ > /dev/null 2>&1; then
echo "❌ Found vim.loop usage (use vim.uv instead)"
exit 1
else
echo "✓ No vim.loop found"
fi

echo "Checking for deprecated requires pattern..."
if grep -r "requires =" lua/ > /dev/null 2>&1; then
echo "❌ Found 'requires =' (use 'dependencies' instead)"
exit 1
else
echo "✓ No deprecated 'requires =' found"
fi

- name: Check plugin count
run: |
COUNT=$(find lua/plugins -name "*.lua" -not -path "*/lsp/*" | wc -l)
echo "Total plugins: $COUNT"
if [ "$COUNT" -gt 60 ]; then
echo "⚠️ Plugin count is high: $COUNT (target: 50-55)"
else
echo "✓ Plugin count is reasonable: $COUNT"
fi
42 changes: 42 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
-- OVIWrite Luacheck Configuration
-- Code linting rules for quality assurance

std = "lua51+vim"

files["lua/plugins"] = {
ignore = {
"212", -- Unused variable
"542", -- Empty statement
}
}

files["lua/config"] = {
ignore = {
"212", -- Unused variable
"542", -- Empty statement
}
}
Comment on lines +6 to +18
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The per-directory luacheck config keys (files["lua/plugins"], files["lua/config"]) won’t match individual Lua files unless they use a glob pattern (e.g. files["lua/plugins/**/*.lua"]). As written, the ignores likely won’t apply, causing unexpected CI lint failures.

Copilot uses AI. Check for mistakes.

-- Global Vim/Neovim APIs
globals = {
"vim",
"OVERRIDES",
}

-- Allow standard library
not_globals = {
-- None - allow all standard library
}

-- Line length (information only, not enforced)
max_line_length = 100

-- Readability
self = true -- Report issues with unused self in methods

-- Don't report errors in certain patterns
exclude_files = {
".git/",
"lazy/",
"vendor/",
}
40 changes: 40 additions & 0 deletions .stylua.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-- stylua: ignore file (This is stylua's own configuration)
-- OVIWrite Lua Code Style Configuration

-- Line length before wrapping
column_width = 100

-- Use spaces instead of tabs
indent_type = "Spaces"

-- Number of spaces per indent level
indent_width = 2

-- Quote style for strings
quote_style = "AutoPreferDouble"

-- Trailing comma handling
trailing_comma = "AsNeeded"

-- Function formatting
function_trailing_comma = false

-- Collapse simple tables/functions
collapse_simple_tables = true
collapse_simple_functions = false

-- Handle operator spacing around specific operators
spaces_around_table_braces = true

-- Comments and documentation
-- Keep original spacing for comments
ignore_comments = false

-- Exclude directories from formatting
exclude = { "tests", ".git" }
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exclude setting is written using Lua table braces ({}), which is invalid TOML. Stylua expects TOML arrays here, otherwise the formatter config won’t load.

Suggested change
exclude = { "tests", ".git" }
exclude = ["tests", ".git"]

Copilot uses AI. Check for mistakes.

-- Wall of stars style comments
wall_of_stars = false

-- EOF newline
Comment on lines +1 to +39
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.stylua.toml must be valid TOML, but this file uses Lua-style -- comments (TOML comments are #) and later uses Lua table syntax like { "tests", ".git" } instead of TOML arrays (e.g. ["tests", ".git"]). As-is, stylua --check will fail to parse the config.

Suggested change
-- stylua: ignore file (This is stylua's own configuration)
-- OVIWrite Lua Code Style Configuration
-- Line length before wrapping
column_width = 100
-- Use spaces instead of tabs
indent_type = "Spaces"
-- Number of spaces per indent level
indent_width = 2
-- Quote style for strings
quote_style = "AutoPreferDouble"
-- Trailing comma handling
trailing_comma = "AsNeeded"
-- Function formatting
function_trailing_comma = false
-- Collapse simple tables/functions
collapse_simple_tables = true
collapse_simple_functions = false
-- Handle operator spacing around specific operators
spaces_around_table_braces = true
-- Comments and documentation
-- Keep original spacing for comments
ignore_comments = false
-- Exclude directories from formatting
exclude = { "tests", ".git" }
-- Wall of stars style comments
wall_of_stars = false
-- EOF newline
# stylua: ignore file (This is stylua's own configuration)
# OVIWrite Lua Code Style Configuration
# Line length before wrapping
column_width = 100
# Use spaces instead of tabs
indent_type = "Spaces"
# Number of spaces per indent level
indent_width = 2
# Quote style for strings
quote_style = "AutoPreferDouble"
# Trailing comma handling
trailing_comma = "AsNeeded"
# Function formatting
function_trailing_comma = false
# Collapse simple tables/functions
collapse_simple_tables = true
collapse_simple_functions = false
# Handle operator spacing around specific operators
spaces_around_table_braces = true
# Comments and documentation
# Keep original spacing for comments
ignore_comments = false
# Exclude directories from formatting
exclude = ["tests", ".git"]
# Wall of stars style comments
wall_of_stars = false
# EOF newline

Copilot uses AI. Check for mistakes.
insert_final_newline = true
Loading
Loading