From 7150b700c2d7a8eac10cdc8c7fcbba24c391b055 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Sun, 15 May 2022 14:37:47 +0200 Subject: [PATCH] ci: add formatting check ci --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ .stylua.toml | 5 +++++ lua/docs-view.lua | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .stylua.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f4fc75a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: CI +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + format_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: lua format check + uses: JohnnyMorganz/stylua-action@1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --color always --check lua/ + diff --git a/.stylua.toml b/.stylua.toml new file mode 100644 index 0000000..609d773 --- /dev/null +++ b/.stylua.toml @@ -0,0 +1,5 @@ +column_width = 100 +line_endings = "Unix" +indent_type = "Spaces" +indent_width = 2 +quote_style = "AutoPreferDouble" diff --git a/lua/docs-view.lua b/lua/docs-view.lua index a2877c4..719f0bc 100644 --- a/lua/docs-view.lua +++ b/lua/docs-view.lua @@ -1,7 +1,7 @@ local M = {} local config = { position = "right", - width = vim.api.nvim_get_option("columns") / 3, + width = 40, } M.setup = function(conf)