diff --git a/.github/workflows/stylua.yml b/.github/workflows/ci.yml similarity index 57% rename from .github/workflows/stylua.yml rename to .github/workflows/ci.yml index 19a16ae..21d9968 100644 --- a/.github/workflows/stylua.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Stylua +name: ci on: pull_request: @@ -11,9 +11,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - uses: JohnnyMorganz/stylua-action@v4 with: token: ${{ secrets.GITHUB_TOKEN }} version: latest - args: --check . \ No newline at end of file + args: --check . + + - name: Lint with Selene + uses: NTBBloodbath/selene-action@v1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --display-style quiet . diff --git a/lua/cp/init.lua b/lua/cp/init.lua index 0673487..98a44e6 100644 --- a/lua/cp/init.lua +++ b/lua/cp/init.lua @@ -285,7 +285,7 @@ function M.setup(user_config) end end, { nargs = "*", - complete = function(ArgLead, CmdLine, ...) + complete = function(ArgLead, _, _) local commands = vim.list_extend(vim.deepcopy(competition_types), { "run", "debug", "diff" }) return vim.tbl_filter(function(cmd) return cmd:find(ArgLead, 1, true) == 1 diff --git a/lua/cp/snippets.lua b/lua/cp/snippets.lua index c81101e..4025324 100644 --- a/lua/cp/snippets.lua +++ b/lua/cp/snippets.lua @@ -8,12 +8,8 @@ function M.setup(config) local snippets = {} - for name, snippet in pairs(config.snippets or {}) do - if type(snippet) == "table" and snippet.trig then - table.insert(snippets, snippet) - else - table.insert(snippets, snippet) - end + for _, snippet in pairs(config.snippets or {}) do + table.insert(snippets, snippet) end if #snippets > 0 then diff --git a/selene.toml b/selene.toml index d03ab0a..df08b7c 100644 --- a/selene.toml +++ b/selene.toml @@ -1 +1,4 @@ std = "vim" + +[config] +lua52 = true