Skip to content

Commit

Permalink
feat: add vimdoc and lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleimp committed Feb 11, 2022
1 parent ce5677c commit 0848868
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/lint.yaml
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/
15 changes: 15 additions & 0 deletions .luacheckrc
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",
}
21 changes: 21 additions & 0 deletions doc/stylua.txt
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:

0 comments on commit 0848868

Please sign in to comment.