Skip to content

Commit 0848868

Browse files
committed
feat: add vimdoc and lint workflow
1 parent ce5677c commit 0848868

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

.github/workflows/lint.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Linting and style checking
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
luacheck:
7+
name: Luacheck
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
13+
- name: Prepare
14+
run: |
15+
sudo apt-get update
16+
sudo apt-get install -y luarocks
17+
sudo luarocks install luacheck
18+
19+
- name: Lint
20+
run: luacheck lua/stylua
21+
22+
stylua:
23+
name: stylua
24+
runs-on: ubuntu-20.04
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: JohnnyMorganz/stylua-action@1.0.0
28+
with:
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
args: --color always --check lua/

.luacheckrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
cache = true
2+
3+
std = luajit
4+
codes = true
5+
6+
self = false
7+
8+
ignore = {
9+
"631", -- max_line_length
10+
}
11+
12+
-- Global objects defined by the C code
13+
globals = {
14+
"vim",
15+
}

doc/stylua.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
===============================================================================
2+
*stylua.nvim*
3+
`stylua.nvim` is a simple plugin that format you Lua code using StyLua
4+
5+
Getting started with stylua.nvim
6+
7+
1. Make sure you have all requirements installed (`StyLua`, `plenary.nvim`).
8+
2. Run |stylua.format| in any lua file.
9+
3. Profit
10+
11+
To find out more:
12+
https://github.com/wesleimp/stylua.nvim
13+
14+
15+
stylua.format({bufnr}) *stylua.format*
16+
Format your Lua code. If {bufnr} is not set, the current buffer will be
17+
used to format >
18+
19+
:lua require("stylua").format()
20+
<
21+
vim:tw=78:ts=8:ft=help:norl:

0 commit comments

Comments
 (0)