diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml new file mode 100644 index 0000000..19a16ae --- /dev/null +++ b/.github/workflows/stylua.yml @@ -0,0 +1,19 @@ +name: Stylua + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + stylua: + 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 diff --git a/lua/cp/init.lua b/lua/cp/init.lua index 8caadfd..1a52fb3 100644 --- a/lua/cp/init.lua +++ b/lua/cp/init.lua @@ -34,18 +34,18 @@ local function setup_python_env() end if vim.fn.isdirectory(venv_dir) == 0 then - log('Setting up Python environment for scrapers...') + log('setting up Python environment for scrapers...') local result = vim.fn.system( ('cd %s && uv sync'):format(vim.fn.shellescape(plugin_path)) ) if vim.v.shell_error ~= 0 then log( - 'Failed to setup Python environment: ' .. result, + 'failed to setup Python environment: ' .. result, vim.log.levels.ERROR ) return false end - log('Python environment setup complete') + log('python environment setup complete') end return true @@ -56,7 +56,7 @@ local competition_types = { 'atcoder', 'codeforces', 'cses', 'icpc' } local function setup_contest(contest_type) if not vim.tbl_contains(competition_types, contest_type) then log( - ('Unknown contest type. Available: [%s]'):format( + ('unknown contest type. Available: [%s]'):format( table.concat(competition_types, ', ') ), vim.log.levels.ERROR diff --git a/readme.md b/readme.md index fce58e9..a21dae6 100644 --- a/readme.md +++ b/readme.md @@ -39,4 +39,7 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim): ## TODO +- vimdocs +- example video +- more flexible setup (more of a question of philosophy) - USACO support