-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(base): implement plugin template
- Loading branch information
Showing
28 changed files
with
632 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
return { | ||
_all = { | ||
coverage = false, | ||
lpath = "lua/?.lua;lua/?/init.lua", | ||
}, | ||
default = { | ||
verbose = true, | ||
}, | ||
tests = { | ||
verbose = true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
root = true | ||
|
||
[*.{lua,md,hs,nix}] | ||
end_of_line = lf | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Bug Report | ||
description: Report a problem in Neorg | ||
labels: [bug] | ||
body: | ||
|
||
- type: checkboxes | ||
id: faq-prerequisite | ||
attributes: | ||
label: Prerequisites | ||
options: | ||
- label: I am using the latest stable release of Neovim | ||
required: true | ||
- label: I am using the latest version of the plugin | ||
required: true | ||
|
||
- type: input | ||
attributes: | ||
label: "Neovim Version" | ||
description: "`nvim --version`:" | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: "Actual behavior" | ||
description: "A description of actual behavior. Extra points if it includes images or videos." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: "Expected behavior" | ||
description: "A description of the behavior you expected." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: "Other information" | ||
description: "Other information that could be helpful with debugging." | ||
|
||
- type: dropdown | ||
id: help | ||
attributes: | ||
label: "Help" | ||
description: "Would you be able to resolve this issue by submitting a pull request?" | ||
options: | ||
- "Yes" | ||
- "Yes, but I don't know how to start. I would need guidance (check question below)" | ||
- "No" | ||
|
||
- type: textarea | ||
attributes: | ||
label: "Implementation help" | ||
description: "If you selected yes in the last question please specify what you would need help with in order to resolve the issue." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
contact_links: | ||
- name: Ask a question | ||
about: If you need help with configuration or something else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Feature request | ||
description: Request a feature for Neorg | ||
labels: [feature] | ||
body: | ||
|
||
- type: checkboxes | ||
id: issue-prerequisite | ||
attributes: | ||
label: Issues | ||
options: | ||
- label: I have checked [existing issues](https://github.com/pysan3/pathlib.nvim/issues?q=is%3Aissue) and there are no existing ones with the same request. | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: "Feature description" | ||
validations: | ||
required: true | ||
|
||
- type: dropdown | ||
id: help | ||
attributes: | ||
label: "Help" | ||
description: "Would you be able to implement this by submitting a pull request?" | ||
options: | ||
- "Yes" | ||
- "Yes, but I don't know how to start. I would need guidance" | ||
- "No" | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: "Implementation help" | ||
description: "If you selected yes in the last question please specify in detail what you would need help with in order to implement this." | ||
validations: | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: generate-docs | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
docs: | ||
name: Generate docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cachix/install-nix-action@v23 | ||
|
||
- name: Generating docs | ||
run: nix run ".#docgen" | ||
|
||
- name: Update documentation | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COMMIT_MSG: | | ||
docs(generated): update doc/pathlib.nvim.txt | ||
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 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}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: lua_ls-typecheck | ||
on: | ||
pull_request: ~ | ||
push: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
name: Type Check Code Base | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Type Check Code Base | ||
uses: mrcjkb/[email protected] | ||
with: | ||
directories: | | ||
lua | ||
tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: luarocks-tag-release | ||
|
||
on: | ||
push: | ||
release: | ||
types: | ||
- created | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
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: | ||
summary: "OS Independent, ultimate solution to path handling in neovim." | ||
detailed_description: | | ||
This plugin aims to decrease the difficulties of path management across mutliple OSs. | ||
The plugin API is heavily inspired by Python's `pathlib.Path` with tweaks to fit neovim usage. | ||
It is mainly used in neo-tree.nvim but it is as simple as you can use it in your own configs! | ||
version: ${{ env.LUAROCKS_VERSION }} | ||
labels: | | ||
neovim | ||
nvim | ||
pathlib | ||
os | ||
test_interpreters: | ||
neovim-stable | ||
neovim-nightly | ||
copy_directories: | | ||
{{ neovim.plugin.dirs }} | ||
doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: release-please | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_run: | ||
workflows: | ||
- lua_ls-typecheck | ||
- stylua | ||
types: | ||
- complete | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release: | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
release-type: simple | ||
package-name: pathlib.nvim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: stylua | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
paths-ignore: | ||
- ".github/**" | ||
- "**.md" | ||
- "**.norg" | ||
|
||
jobs: | ||
format-with-stylua: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache cargo modules | ||
id: cache-cargo | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ~/.cargo | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Install cargo | ||
run: curl https://sh.rustup.rs -sSf | sh -s -- -y | ||
|
||
- name: Install stylua | ||
run: cargo install stylua --features lua51 | ||
|
||
- name: Run formatting | ||
run: stylua -v --verify . | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "chore: autoformat with stylua" | ||
branch: ${{ github.ref }} | ||
|
||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,10 @@ luac.out | |
*.x86_64 | ||
*.hex | ||
|
||
# Luarocks testing files | ||
/luarocks | ||
/lua_modules | ||
/.luarocks | ||
/lua | ||
|
||
!/lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ignore = { | ||
"631", -- max_line_length | ||
"122", -- read-only field of global variable | ||
} | ||
read_globals = { | ||
"vim", | ||
"describe", | ||
"it", | ||
"assert" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", | ||
"Lua.diagnostics.globals": [ | ||
"vim" | ||
], | ||
"workspace.checkThirdParty": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,43 @@ | ||
# pathlib.nvim | ||
Ultimate solution to path handling in neovim. OS Independent. | ||
``` document.meta | ||
title: README | ||
description: | ||
authors: takuto | ||
categories: | ||
created: 2023-11-14 | ||
updated: 2023-11-14T01:17:18+0900 | ||
version: 1.1.1 | ||
``` | ||
``` embed | ||
<div align="center"> | ||
<h1>pathlib.nvim</h1> | ||
<p> | ||
<strong> | ||
OS Independent, ultimate solution to path handling in neovim. | ||
</strong> | ||
</p> | ||
</div> | ||
``` | ||
|
||
# `pathlib.nvim` | ||
|
||
This plugin aims to decrease the difficulties of path management across | ||
mutliple OSs. The plugin API is heavily inspired by Python's | ||
`pathlib.Path` with tweaks to fit neovim usage. It is mainly used in | ||
[neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) but it | ||
is as simple as you can use it in your own configs! | ||
|
||
[![Neovim](https://img.shields.io/badge/NeoVim-%2357A143.svg?&style=for-the-badge&logo=neovim&logoColor=white)](https://neovim.io/) | ||
[![Lua](https://img.shields.io/badge/lua-%232C2D72.svg?style=for-the-badge&logo=lua&logoColor=white)](https://www.lua.org/) | ||
|
||
[![MLP-2.0](https://img.shields.io/github/license/pysan3/pathlib.nvim.svg?style=for-the-badge)](https://github.com/pysan3/pathlib.nvim/blob/master/LICENSE) | ||
[![Issues](https://img.shields.io/github/issues/pysan3/pathlib.nvim.svg?style=for-the-badge)](https://github.com/pysan3/pathlib.nvim/issues) | ||
[![Build | ||
Status](https://img.shields.io/github/actions/workflow/status/pysan3/pathlib.nvim/release-please.yml?style=for-the-badge)](https://github.com/pysan3/pathlib.nvim/actions/workflows/release-please.yml) | ||
[![LuaRocks](https://img.shields.io/luarocks/v/pysan3/pathlib.nvim?logo=lua&color=purple&style=for-the-badge)](https://luarocks.org/modules/pysan3/pathlib.nvim) | ||
|
||
# Other Projects | ||
|
||
- Python `pathlib` | ||
|
||
- <https://docs.python.org/3/library/pathlib.html> |
Oops, something went wrong.