Meh I'll figure out submodules later

This commit is contained in:
mustard 2025-09-16 01:01:02 +02:00
parent 4ca9d44a90
commit 8cb281f436
352 changed files with 66107 additions and 0 deletions

View file

@ -0,0 +1,33 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"diagnostics": {
"libraryFiles": "Disable"
},
"runtime": {
"version": "LuaJIT",
"path": [
"lua/?.lua",
"lua/?/init.lua",
"library/?.lua",
"library/?/init.lua"
]
},
"workspace": {
"checkThirdParty": "Disable",
"library": [
"$PWD/.dependencies/pack/vendor/start/plenary.nvim",
"$PWD/.dependencies/pack/vendor/start/nui.nvim",
"$PWD/.dependencies/pack/vendor/start/nvim-web-devicons",
"$PWD/.dependencies/pack/vendor/start/snacks.nvim",
"${3rd}/luassert",
"${3rd}/busted",
"${3rd}/luv",
"$VIMRUNTIME"
],
"ignoreDir": [
".dependencies",
".luarocks",
".lua"
]
}
}

View file

@ -0,0 +1,33 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"diagnostics": {
"libraryFiles": "Disable"
},
"runtime": {
"version": "LuaJIT",
"path": [
"lua/?.lua",
"lua/?/init.lua",
"library/?.lua",
"library/?/init.lua"
]
},
"workspace": {
"checkThirdParty": "Disable",
"library": [
"$PWD/.dependencies/pack/vendor/start/plenary.nvim",
"$PWD/.dependencies/pack/vendor/start/nui.nvim",
"$PWD/.dependencies/pack/vendor/start/nvim-web-devicons",
"$PWD/.dependencies/pack/vendor/start/snacks.nvim",
"${3rd}/luassert",
"${3rd}/busted",
"${3rd}/luv",
"$VIMRUNTIME"
],
"ignoreDir": [
".dependencies",
".luarocks",
".lua"
]
}
}

View file

@ -0,0 +1,84 @@
name: CI
on:
push:
branches:
- main
- v1.x
- v2.x
- v3.x
pull_request:
workflow_dispatch:
jobs:
stylua-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check formatting
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --color always --check lua/
plenary-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
rev: nightly/nvim-linux-x86_64.tar.gz
- os: ubuntu-22.04
rev: v0.8.3/nvim-linux64.tar.gz
- os: ubuntu-22.04
rev: v0.9.5/nvim-linux64.tar.gz
- os: ubuntu-22.04
rev: v0.10.4/nvim-linux-x86_64.tar.gz
steps:
- uses: actions/checkout@v4
- run: date +%F > todays-date
- name: Restore cache for today's nightly.
uses: actions/cache@v4
with:
path: build
key: ${{ runner.os }}-${{ matrix.rev }}-${{ hashFiles('todays-date') }}
- name: Prepare
run: |
test -d build || {
mkdir -p build
curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.rev }}" | tar xzf - --strip-components=1 -C "${PWD}/build"
}
# - name: Get Luver Cache Key
# id: luver-cache-key
# env:
# CI_RUNNER_OS: ${{ runner.os }}
# run: |
# echo "::set-output name=value::${CI_RUNNER_OS}-luver-v1-$(date -u +%Y-%m-%d)"
# shell: bash
# - name: Setup Luver Cache
# uses: actions/cache@v2
# with:
# path: ~/.local/share/luver
# key: ${{ steps.luver-cache-key.outputs.value }}
# - name: Setup Lua
# uses: MunifTanjim/luver-action@v1
# with:
# default: 5.1.5
# lua_versions: 5.1.5
# luarocks_versions: 5.1.5:3.8.0
# - name: Setup luacov
# run: |
# luarocks install luacov
- name: Run tests
run: |
export PATH="${PWD}/build/bin:${PATH}"
make setup
make test
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v2

View file

@ -0,0 +1,44 @@
name: Lua Language Server Diagnostics
on:
pull_request: ~
push:
branches:
- '*'
jobs:
luals-check:
strategy:
matrix:
neovim: ["0.10"]
lua: ["5.1", "luajit-master"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: luarocks/gh-actions-lua@v10
with:
luaVersion: ${{matrix.lua}}
- name: Install lua-language-server
uses: jdx/mise-action@v2
with:
mise_toml: |
[tools]
neovim = "${{ matrix.neovim }}"
cargo-binstall = "latest"
"cargo:emmylua_check" = "latest"
"cargo:emmylua_ls" = "latest"
lua-language-server = "3.13.9"
- name: Run lua-language-server check
run: |
LUARC=".github/workflows/.luarc-${{ matrix.lua }}.json"
make luals-check CONFIGURATION="$LUARC"
- name: Run emmylua_check
continue-on-error: true # Doesn't type-check well enough to be worth erroring on, but this runs so fast we might as well help test this out.
run: |
LUARC=".github/workflows/.luarc-${{ matrix.lua }}.json"
make emmylua-check CONFIGURATION="$LUARC"

View file

@ -0,0 +1,29 @@
---
name: Push to Luarocks
on:
push:
tags:
- '*'
workflow_dispatch:
pull_request: # Will test the luarocks installation on PR, without uploading
jobs:
luarocks-upload:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to count the commits
- name: Get Version
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v5
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
version: ${{ env.LUAROCKS_VERSION }}
dependencies: |
plenary.nvim
nvim-web-devicons
nui.nvim

View file

@ -0,0 +1,29 @@
# This is a basic workflow to help you get started with Actions
name: No PRs to Release Branches
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the v1.x branch
pull_request:
types: [opened, edited, ready_for_review]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
check_target:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- name: Fail when targeting v2
run: |
target=${{ github.base_ref }}
echo "Target is: $target"
if [[ $target != "main" ]]; then
echo "PRs must target main"
exit 1
else
exit 0
fi