1

Regenerate nvim config

This commit is contained in:
2024-06-02 03:29:20 +02:00
parent 75eea0c030
commit ef2e28883d
5576 changed files with 604886 additions and 503 deletions

View File

@ -0,0 +1,129 @@
name: Bug Report
description: File a bug/issue
title: "bug: "
labels: [bug]
body:
- type: markdown
attributes:
value: |
Before reporting a bug, make sure to search [existing issues](https://github.com/stevearc/conform.nvim/issues)
- type: input
attributes:
label: "Neovim version (nvim -v)"
placeholder: "0.8.0 commit db1b0ee3b30f"
validations:
required: true
- type: input
attributes:
label: "Operating system/version"
placeholder: "MacOS 11.5"
validations:
required: true
- type: checkboxes
attributes:
label: Add the debug logs
options:
- label: I have set `log_level = vim.log.levels.DEBUG` and pasted the log contents below.
required: true
- type: textarea
attributes:
label: "Log file"
description: "Recent contents from the log file. You can find it with :ConformInfo"
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: dropdown
attributes:
label: What is the severity of this bug?
options:
- minor (annoyance)
- tolerable (can work around it)
- breaking (some functionality is broken)
- blocking (cannot use plugin)
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. nvim -u repro.lua
2.
3.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Minimal example file
description: A small example file you are editing that produces the issue
validations:
required: false
- type: textarea
attributes:
label: Minimal init.lua
description:
Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
This uses lazy.nvim (a plugin manager).
value: |
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"folke/tokyonight.nvim",
{
"stevearc/conform.nvim",
config = function()
require("conform").setup({
log_level = vim.log.levels.DEBUG,
-- add your config here
})
end,
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
render: Lua
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Any additional information or screenshots you would like to provide
validations:
required: false

View File

@ -0,0 +1,43 @@
name: Feature Request
description: Submit a feature request
title: "feature request: "
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
Before submitting a feature request, make sure to search for [existing requests](https://github.com/stevearc/conform.nvim/issues)
- type: checkboxes
attributes:
label: Did you check existing requests?
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Describe the feature
description: A short summary of the feature you want
validations:
required: true
- type: textarea
attributes:
label: Provide background
description: Describe the reasoning behind why you want the feature.
placeholder: I am trying to do X. My current workflow is Y.
validations:
required: false
- type: dropdown
attributes:
label: What is the significance of this feature?
options:
- nice to have
- strongly desired
- cannot use this plugin without it
validations:
required: true
- type: textarea
attributes:
label: Additional details
description: Any additional information you would like to provide. Things you've tried, alternatives considered, examples from other plugins, etc.
validations:
required: false

View File

@ -0,0 +1,3 @@
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
set -e
make fastlint

View File

@ -0,0 +1,11 @@
#!/nix/store/306znyj77fv49kwnkpxmb0j2znqpa8bj-bash-5.2p26/bin/bash
set -e
IFS=' '
while read local_ref _local_sha _remote_ref _remote_sha; do
remote_main=$( (git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null || echo "///master") | cut -f 4 -d / | tr -d "[:space:]")
local_ref_short=$(echo "$local_ref" | cut -f 3 -d / | tr -d "[:space:]")
if [ "$local_ref_short" = "$remote_main" ]; then
make lint
make test
fi
done

View File

@ -0,0 +1,16 @@
name: Remove Question Label on Issue Comment
on: [issue_comment]
jobs:
# Remove the "question" label when a new comment is added.
# This lets me ask a question, tag the issue with "question", and filter out all "question"-tagged
# issues in my "needs triage" filter.
remove_question:
runs-on: ubuntu-latest
if: github.event.sender.login != 'stevearc'
steps:
- uses: actions/checkout@v4
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: question

View File

@ -0,0 +1,27 @@
name: Request Review
permissions:
pull-requests: write
on:
pull_request_target:
types: [opened, reopened, ready_for_review, synchronize]
branches-ignore:
- "release-please--**"
jobs:
# Request review automatically when PRs are opened
request_review:
runs-on: ubuntu-latest
steps:
- name: Request Review
uses: actions/github-script@v7
if: github.actor != 'stevearc'
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const pr = context.payload.pull_request;
github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
reviewers: ['stevearc']
});

View File

@ -0,0 +1,12 @@
#!/bin/bash
set -e
PLUGINS="$HOME/.local/share/nvim/site/pack/plugins/start"
mkdir -p "$PLUGINS"
wget "https://github.com/neovim/neovim/releases/download/${NVIM_TAG-stable}/nvim.appimage"
chmod +x nvim.appimage
./nvim.appimage --appimage-extract >/dev/null
rm -f nvim.appimage
mkdir -p ~/.local/share/nvim
mv squashfs-root ~/.local/share/nvim/appimage
sudo ln -s "$HOME/.local/share/nvim/appimage/AppRun" /usr/bin/nvim

View File

@ -0,0 +1,124 @@
name: Run tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
luacheck:
name: Luacheck
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Prepare
run: |
sudo apt-get update
sudo add-apt-repository universe
sudo apt install luarocks -y
sudo luarocks install luacheck
- name: Run Luacheck
run: luacheck lua tests
typecheck:
name: typecheck
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: stevearc/nvim-typecheck-action@v1
with:
path: lua
stylua:
name: StyLua
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Stylua
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: v0.20.0
args: --check lua tests
run_tests:
strategy:
matrix:
include:
- nvim_tag: v0.8.3
- nvim_tag: v0.9.4
- nvim_tag: v0.10.0
name: Run tests
runs-on: ubuntu-22.04
env:
NVIM_TAG: ${{ matrix.nvim_tag }}
steps:
- uses: actions/checkout@v4
- name: Install Neovim and dependencies
run: |
bash ./.github/workflows/install_nvim.sh
- name: Run tests
run: |
bash ./run_tests.sh
update_docs:
name: Update docs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Neovim and dependencies
run: |
bash ./.github/workflows/install_nvim.sh
- name: Update docs
run: |
python -m pip install pyparsing==3.0.9
make doc
- name: Commit changes
if: ${{ github.ref == 'refs/heads/master' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_MSG: |
[docgen] Update docs
skip-checks: true
run: |
git config user.email "actions@github"
git config user.name "Github Actions"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git add README.md doc
# Only commit and push if we have changes
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push origin HEAD:${GITHUB_REF})
release:
name: release
if: ${{ github.ref == 'refs/heads/master' }}
needs:
- luacheck
- stylua
- typecheck
- run_tests
- update_docs
runs-on: ubuntu-22.04
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: simple
- uses: actions/checkout@v4
- uses: rickstaa/action-create-tag@v1
if: ${{ steps.release.outputs.release_created }}
with:
tag: stable
message: "Current stable release: ${{ steps.release.outputs.tag_name }}"
tag_exists_error: false
force_push_tag: true