-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 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,30 @@ | ||
name: Linting and style checking | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
luacheck: | ||
name: Luacheck | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Prepare | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y luarocks | ||
sudo luarocks install luacheck | ||
- name: Lint | ||
run: luacheck lua/stylua | ||
|
||
stylua: | ||
name: stylua | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: JohnnyMorganz/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --color always --check 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,15 @@ | ||
cache = true | ||
|
||
std = luajit | ||
codes = true | ||
|
||
self = false | ||
|
||
ignore = { | ||
"631", -- max_line_length | ||
} | ||
|
||
-- Global objects defined by the C code | ||
globals = { | ||
"vim", | ||
} |
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,21 @@ | ||
=============================================================================== | ||
*stylua.nvim* | ||
`stylua.nvim` is a simple plugin that format you Lua code using StyLua | ||
|
||
Getting started with stylua.nvim | ||
|
||
1. Make sure you have all requirements installed (`StyLua`, `plenary.nvim`). | ||
2. Run |stylua.format| in any lua file. | ||
3. Profit | ||
|
||
To find out more: | ||
https://github.com/wesleimp/stylua.nvim | ||
|
||
|
||
stylua.format({bufnr}) *stylua.format* | ||
Format your Lua code. If {bufnr} is not set, the current buffer will be | ||
used to format > | ||
:lua require("stylua").format() | ||
< | ||
vim:tw=78:ts=8:ft=help:norl: |