Squashed 'users/daniel/configs/system/nvim/nvim/' content from commit e088bce

git-subtree-dir: users/daniel/configs/system/nvim/nvim
git-subtree-split: e088bce2bd90c0b5c35d13a8615a55455b96294d
This commit is contained in:
2023-06-23 13:09:37 +01:00
commit 88674ae2b2
96 changed files with 7965 additions and 0 deletions

74
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at {{ email }}. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org

170
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,170 @@
# CONTRIBUTING
## AstroNvim install for contributors
If you wish to contribute to AstroNvim, you should:
1. [create a fork on GitHub](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
2. clone your fork to your machine
- For ssh:
```shell
$ git clone git@github.com:<YOUR GITHUB USERNAME>/AstroNvim.git ~/.config/nvim
```
- For https:
```shell
$ git clone https://github.com/<YOUR GITHUB USERNAME>/AstroNvim.git ~/.config/nvim
```
3. [add a new remote repo to track](https://www.atlassian.com/git/tutorials/git-forks-and-upstreams)
- this means you can push/pull as normal to your own repo, but also easily track & update from the AstroNvim repo
- for ssh:
```shell
$ git remote add upstream git@github.com:AstroNvim/AstroNvim.git
```
- for https:
```shell
$ git remote add upstream https://github.com/AstroNvim/AstroNvim.git
```
4. any time you create a branch to do some work, use
```shell
$ git fetch upstream && git checkout -b dev-myFEAT upstream/main
```
5. only use the **--rebase** flag to update your dev branch
- this means that there are no `Merge AstroNvim/main into devBranch` commits, which are to be avoided
```shell
$ git pull upstream --rebase
```
## Things to know before contributing
- Development happens on the `nightly` branch, so please make sure of a couple things
- all branches are rebased on the `nightly` branch to get the latest updates.
- all pull requests are made to merge into `nightly`
- When making a PR (pull request), please be very descriptive about what you've done!
- Commit messages must follow [Conventional Commits Specification](https://www.conventionalcommits.org/en/v1.0.0/)
- PR titles and commit messages should be formatted with 'fix', 'feat', 'docs', 'refactor', or 'chore'. ex: `feat: add new plugin`
- If your contribution mostly pertains to a single module in AstroNvim, please include that in the title. ex: If you have modified something in the `lua/configs/lsp` folder for the lsp configuration use something like `fix(lsp): typo in lsp mappings`
- If your contribution contains any sort of breaking change include a `!` at the end of the change type. ex: `feat!: move status bar from lualine to feline`
- PRs should follow the pull request formats where applicable
- We are open to all PRs, but if a PR is denied for any reason please don't be discouraged! We'll still be open to discussions. If you have any questions before opening the PR feel free to join the [discord server](https://discord.gg/UcZutyeaFW).
- AstroNvim aims to provide the best user experience when it comes to being able to support confident updating for users, for this reason please avoid opening PRs with breaking changes. Avoiding breaking changes is not always going to be possible, so if you think it is completely necessary we are open to discussion.
## How to remove, squash, or edit commits from your PR
> You may have been directed here to remove a commit such as a merge commit: `Merge AstroNvim/main into devBranch` from your PR
> As these commands edit your git history, you may need to **force push** with `git push origin --force-with-lease`
1. Run the following:
```
$ git rebase -i HEAD~<NUMBER OF COMMITS TO GO BACK>
```
<details><summary>Example</summary>
<p>
```shell
$ git rebase -i HEAD~4
```
```shell
pick 28b2dcb feat: statusline add lsp status
pick dad9a39 fix: typo
pick 68f72f1 add clickable btn for exiting nvim
pick b281b53 avoid using q! for quitting vim
# Rebase 52b655b..b281b53 onto 52b655b (4 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# . create a merge commit using the original merge commit's
# . message (or the oneline, if no original merge commit was
# . specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
```
</p>
</details>
2. Change the `pick` commands to whatever you wish, you may wish to `s` `squash`, `d` `drop` or `e` `edit` a commit. Then save & quit this git file to run it.
<details><summary>Example</summary>
<p>
```shell {3,4}
pick 28b2dcb feat: statusline add lsp status
squash dad9a39 fix: typo
edit 68f72f1 add clickable btn for exiting nvim
d b281b53 avoid using q! for quitting vim
# Rebase 52b655b..b281b53 onto 52b655b (4 commands)
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# . create a merge commit using the original merge commit's
# . message (or the oneline, if no original merge commit was
# . specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out
```
</p>
</details>
3. If you picked `drop` you are done. If you picked `squash` then you will be brought to a screen to update the commit message for the new aggregated commit, please make sure the new commit message follows the Conventional Commit specification. If you picked `edit` then edit your files, then run:
```shell
$ git add <files>
```
4. Continue rebasing until all edits are finished. Run the following command to continue through the rebase if there are more changes:
```shell
$ git rebase --continue
```
5. Push the changes with `--force-with-lease`:
```shell
$ git push origin --force-with-lease
```
## Help
For help with contributing and anything else AstroNvim related join the [discord](https://discord.gg/UcZutyeaFW)

4
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
github: AstroNvim
ko_fi: mehalter
liberapay: mehalter
custom: https://www.buymeacoffee.com/mehalter

78
.github/ISSUE_TEMPLATE/bug_report.yaml vendored Normal file
View File

@@ -0,0 +1,78 @@
name: Bug report
description: Create a report to help us improve
labels: [bug]
body:
- type: checkboxes
id: terms
attributes:
label: Checklist
description: Have you completed the following steps and are still able to replicate the issue?
options:
- label: "Using a stable version of Neovim (i.e. not neovim nightly)"
required: true
- label: "`:AstroUpdate`"
required: true
- label: Restarted AstroNvim
required: true
- type: input
id: system-version
attributes:
label: "Operating system/version"
placeholder: "macOS 11.5"
validations:
required: true
- type: input
id: terminal
attributes:
label: "Terminal/GUI"
placeholder: "kitty"
validations:
required: true
- type: textarea
id: health
attributes:
label: AstroNvim Health
description: Output of `:checkhealth astronvim`
placeholder: |
## AstroNvim
- INFO: AstroNvim Version: nightly (v2.11.8-181-g11d5990)
- INFO: Neovim Version: v0.8.3
- OK: Using stable Neovim >= 0.8.0
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe the bug
placeholder: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Steps to Reproduce
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
placeholder: A clear and concise description of what you expected to happen
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots or recording ([Asciinema](asciinema.org)) to help explain your problem.
- type: textarea
id: additional-context
attributes:
label: Additional Context
placeholder: Add any additional context about the problem here.

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: r/AstroNvim (Reddit)
url: https://www.reddit.com/r/AstroNvim
about: Ask questions about AstroNvim on the official Subreddit
- name: Discord Chat
url: https://discord.gg/UcZutyeaFW
about: Ask questions and have discussions about AstroNvim on Discord

View File

@@ -0,0 +1,22 @@
name: Feature request
description: Suggest an idea for this project
labels: [enhancement]
body:
- type: textarea
id: problem
attributes:
label: Is your feature related to a problem?
placeholder: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- type: textarea
id: solution
attributes:
label: Describe the new feature
placeholder: A clear and concise description of what the new feature is.
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional context
placeholder: Add any other context or screenshots about the feature request here.

View File

@@ -0,0 +1,7 @@
Fixes Issue # (If it doesn't fix an issue then delete this line)
Description:
Describe the refactor or cleanup that was completed
Other:
Anything else relevant goes here

View File

@@ -0,0 +1,10 @@
Fixes Issue # (If it doesn't fix an issue then delete this line)
Features Added:
- Plugin Name (Add links if possible too)
Reasoning:
List why the feature is needed
Other:
Anything else relevant goes here

7
.github/PULL_REQUEST_TEMPLATE/fix.md vendored Normal file
View File

@@ -0,0 +1,7 @@
Fixes Issue # (If it doesn't fix an issue then delete this line)
Bugs Fixed:
- A bullet for each bug fixed and a description
Other:
Anything else relevant goes here

189
.github/README.md vendored Normal file
View File

@@ -0,0 +1,189 @@
<div align="center" id="madewithlua">
<img src="https://astronvim.com/img/logo/astronvim.svg" width="110", height="100">
</div>
<h1 align="center">AstroNvim</h1>
<h4 align="center">
<a href="https://astronvim.com/#%EF%B8%8F-installation">Install</a>
·
<a href="https://astronvim.com/#%EF%B8%8F-configuration">Configure</a>
·
<a href="https://github.com/AstroNvim/astrocommunity">Community Plugins</a>
·
<a href="https://astronvim.com">Docs</a>
·
<a href="https://discord.gg/AstroNvim">Discord</a>
</h4>
<p align="center">
<a href="https://github.com/AstroNvim/AstroNvim/pulse">
<img src="https://img.shields.io/github/last-commit/AstroNvim/AstroNvim?style=for-the-badge&logo=github&color=7dc4e4&logoColor=D9E0EE&labelColor=302D41"/>
</a>
<a href="https://github.com/AstroNvim/AstroNvim/releases/latest">
<img src="https://img.shields.io/github/v/release/AstroNvim/AstroNvim?style=for-the-badge&logo=gitbook&color=8bd5ca&logoColor=D9E0EE&labelColor=302D41"/>
</a>
<a href="https://github.com/AstroNvim/AstroNvim/stargazers">
<img src="https://img.shields.io/github/stars/AstroNvim/AstroNvim?style=for-the-badge&logo=apachespark&color=eed49f&logoColor=D9E0EE&labelColor=302D41"/>
</a>
<img src="https://img.shields.io/endpoint?url=https://waka.mehalter.com/api/compat/shields/v1/mehalter/interval:any/label:AstroNvim&style=for-the-badge&label=wakatime&logo=wakatime&color=a6da95&logoColor=D9E0EE&labelColor=302D41"/>
<br>
<a href="https://www.twitter.com/AstroNvim">
<img src="https://img.shields.io/twitter/follow/AstroNvim?style=for-the-badge&logo=twitter&color=fab387&logoColor=D9E0EE&labelColor=302D41"/>
</a>
<a href="https://social.mehalter.com/@AstroNvim">
<img src="https://img.shields.io/mastodon/follow/109649751340616771?domain=https%3A%2F%2Fsocial.mehalter.com&style=for-the-badge&logo=mastodon&color=eebebe&logoColor=D9E0EE&labelColor=302D41"/>
</a>
<a href="https://www.reddit.com/r/AstroNvim/">
<img src="https://img.shields.io/reddit/subreddit-subscribers/AstroNvim?style=for-the-badge&logo=reddit&color=ee99a0&logoColor=D9E0EE&labelColor=302D41"/>
</a>
<a href="https://discord.gg/astronvim">
<img src="https://img.shields.io/discord/939594913560031363?style=for-the-badge&logo=discord&color=cba6f7&logoColor=D9E0EE&labelColor=302D41"/>
</a>
</p>
<p align="center">
AstroNvim is an aesthetic and feature-rich neovim config that is extensible and easy to use with a great set of plugins
</p>
## 🌟 Preview
![Dashboard Preview Image](https://github.com/AstroNvim/astronvim.github.io/raw/main/static/img/dashboard.png)
![Coding Preview Image](https://github.com/AstroNvim/astronvim.github.io/raw/main/static/img/overview.png)
![Debugging Preview Image](https://github.com/AstroNvim/astronvim.github.io/raw/main/static/img/dap.png)
## ✨ Features
- Common plugin specifications with [AstroCommunity](https://github.com/AstroNvim/astrocommunity)
- File explorer with [Neo-tree](https://github.com/nvim-neo-tree/neo-tree.nvim)
- Autocompletion with [Cmp](https://github.com/hrsh7th/nvim-cmp)
- Git integration with [Gitsigns](https://github.com/lewis6991/gitsigns.nvim)
- Statusline, Winbar, and Bufferline with [Heirline](https://github.com/rebelot/heirline.nvim)
- Terminal with [Toggleterm](https://github.com/akinsho/toggleterm.nvim)
- Fuzzy finding with [Telescope](https://github.com/nvim-telescope/telescope.nvim)
- Syntax highlighting with [Treesitter](https://github.com/nvim-treesitter/nvim-treesitter)
- Formatting and Linting with [Null-ls](https://github.com/jose-elias-alvarez/null-ls.nvim)
- Language Server Protocol with [Native LSP](https://github.com/neovim/nvim-lspconfig)
- Debug Adapter Protocol with [nvim-dap](https://github.com/mfussenegger/nvim-dap)
## ⚡ Requirements
- [Nerd Fonts](https://www.nerdfonts.com/font-downloads) (_Optional with manual intervention:_ See [Documentation on customizing icons](https://astronvim.com/Recipes/icons))
- [Neovim 0.8+ (_Not_ including nightly)](https://github.com/neovim/neovim/releases/tag/stable)
- [Tree-sitter CLI](https://github.com/tree-sitter/tree-sitter/blob/master/cli/README.md) (_Note:_ This is only necessary if you want to use `auto_install` feature with Treesitter)
- A clipboard tool is necessary for the integration with the system clipboard (see [`:help clipboard-tool`](https://neovim.io/doc/user/provider.html#clipboard-tool) for supported solutions)
- Terminal with true color support (for the default theme, otherwise it is dependent on the theme you are using)
- Optional Requirements:
- [ripgrep](https://github.com/BurntSushi/ripgrep) - live grep telescope search (`<leader>fw`)
- [lazygit](https://github.com/jesseduffield/lazygit) - git ui toggle terminal (`<leader>tl` or `<leader>gg`)
- [go DiskUsage()](https://github.com/dundee/gdu) - disk usage toggle terminal (`<leader>tu`)
- [bottom](https://github.com/ClementTsang/bottom) - process viewer toggle terminal (`<leader>tt`)
- [Python](https://www.python.org/) - python repl toggle terminal (`<leader>tp`)
- [Node](https://nodejs.org/en/) - node repl toggle terminal (`<leader>tn`)
> Note when using default theme: For MacOS, the default terminal does not have true color support. You will need to use [iTerm2](https://iterm2.com/) or another [terminal emulator](https://gist.github.com/XVilka/8346728#terminal-emulators) that has true color support.
## 🛠️ Installation
### Linux/Mac OS (Unix)
#### Make a backup of your current nvim and shared folder
```shell
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
```
#### Clone the repository
```shell
git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim
nvim
```
### Windows (Powershell)
#### Make a backup of your current nvim and nvim-data folder
```pwsh
Rename-Item -Path $env:LOCALAPPDATA\nvim -NewName $env:LOCALAPPDATA\nvim.bak
Rename-Item -Path $env:LOCALAPPDATA\nvim-data -NewName $env:LOCALAPPDATA\nvim-data.bak
```
#### Clone the repository
```pwsh
git clone --depth 1 https://github.com/AstroNvim/AstroNvim $env:LOCALAPPDATA\nvim
nvim
```
## 📦 Basic Setup
#### Install LSP
Enter `:LspInstall` followed by the name of the server you want to install<br>
Example: `:LspInstall pyright`
#### Install language parser
Enter `:TSInstall` followed by the name of the language you want to install<br>
Example: `:TSInstall python`
#### Install Debugger
Enter `:DapInstall` followed by the name of the debugger you want to install<br>
Example: `:DapInstall python`
#### Manage plugins
Run `:Lazy check` to check for plugin updates
Run `:Lazy update` to apply any pending plugin updates
Run `:Lazy clean` to remove any disabled or unused plugins
Run `:Lazy sync` to update and clean plugins
#### Update AstroNvim
Run `:AstroUpdate` to get the latest updates from the repository<br>
#### Update AstroNvim Packages
Run `:AstroUpdatePackages` (`<leader>pa`) to update both Neovim plugins and Mason packages
## 🗒️ Links
[AstroNvim Documentation](https://astronvim.com)
[Core AstroNvim LUA API Documentation](https://api.astronvim.com)
- [Basic Usage](https://astronvim.com/Basic%20Usage/walkthrough) is given for basic usage
- [Default Mappings](https://astronvim.com/Basic%20Usage/mappings) more about the default key bindings
- [Default Plugin Configuration](https://astronvim.com/configuration/plugin_defaults) more about the provided plugin defaults
- [Advanced Configuration](https://astronvim.com/configuration/config_options) more about advanced configuration
### 📹 Videos
There have been some great review videos released by members of the community! Here are a few:
- [Neovim With AstroNvim | Your New Advanced Development Editor](https://www.youtube.com/watch?v=GEHPiZ10gOk) (Version: 3, Content By: [@Cretezy](https://github.com/Cretezy))
- [Why I'm quitting VIM by Carlos Mafla](https://www.youtube.com/watch?v=71GDopdc9rw) (Version: 2, Content By: [@gigo6000](https://github.com/gigo6000))
- [Astro Vim - All in one Nvim config!! by John McBride](https://www.youtube.com/watch?v=JQLZ7NJRTEo) (Version: 1, Content By: [@jpmcb](https://github.com/jpmcb))
## 🚀 Contributing
If you plan to contribute, please check the [contribution guidelines](CONTRIBUTING.md) first.
## ⭐ Credits
Sincere appreciation to the following repositories, plugin authors and the entire neovim community out there that made the development of AstroNvim possible.
- [Plugins](https://astronvim.com/acknowledgements#plugins-used-in-astronvim)
- [NvChad](https://github.com/NvChad/NvChad)
- [LunarVim](https://github.com/LunarVim)
- [CosmicVim](https://github.com/CosmicNvim/CosmicNvim)
<div align="center" id="madewithlua">
[![Lua](https://img.shields.io/badge/Made%20with%20Lua-blue.svg?style=for-the-badge&logo=lua)](https://lua.org)
</div>

19
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- notice
- wip
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed in 7 days if no further activity occurs.
Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

View File

@@ -0,0 +1,13 @@
name: Conventional Commits
on:
pull_request:
branches: [main]
jobs:
build:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: webiny/action-conventional-commits@v1.1.0

34
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
name: Documentation
on:
push:
branches: ["main"]
pull_request:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Lua
uses: leafo/gh-actions-lua@v8
with:
luaVersion: 5.4
- name: Install LDoc
uses: leafo/gh-actions-luarocks@v4
- name: Setup dependencies
run: luarocks install ldoc
- name: Build Docs
run: |
ldoc .
- name: Set CNAME
run: |
echo "api.astronvim.com" > docs/CNAME
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs

13
.github/workflows/luacheck.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: Lua Linting
on:
push:
branches: ["main"]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: lunarmodules/luacheck@v1

14
.github/workflows/spell.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: Spell Check
on:
pull_request:
jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3
- name: Check spelling
uses: crate-ci/typos@v1.14.5

18
.github/workflows/style.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Style Check
on:
push:
branches: ["main"]
pull_request:
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
# CLI arguments
args: --check .

35
.github/workflows/updater.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Updater Comment
on:
pull_request_target:
paths: ["**.lua"]
types: ["opened"]
jobs:
updater-comment:
name: Comment updater settings
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
const src = context.payload.pull_request.head
const user = src.user.login
const tab = " "
let settings = tab + "updater = {\n" + tab + tab + `channel = "nightly",\n`
if (src.ref != "nightly") {
settings += tab + tab + `branch = "${src.ref}",\n`
}
if (user != "AstroNvim") {
settings += tab + tab + `remote = "${user}",\n`
settings += tab + tab + `remotes = {\n`
settings += tab + tab + tab + `["${user}"] = "${user}/${src.repo.name}",\n`
settings += tab + tab + `},\n`
}
settings += tab + "},"
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Use the following `updater` settings in your `user/init.lua` file, restart, and run `:AstroUpdate` to test this pull request:\n```\n" + settings + "\n```",
})