Skip to content

Commit

Permalink
ci: add minor ci setup
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Jun 1, 2024
1 parent 3b670ca commit fe02803
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 20 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://docs.github.com/en/github/administering-a-repository/managing-repository-settings/displaying-a-sponsor-button-in-your-repository

custom: https://www.paypal.me/ChrisGrieser
ko_fi: pseudometa
33 changes: 33 additions & 0 deletions .github/workflows/semantic-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Ensure Conventional Commits-like PR titles

on:
pull_request_target:
types: [opened, edited, synchronize]

permissions:
pull-requests: read

jobs:
semantic-pull-request:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
# add `improv` to the list of allowed types
with:
types: |
improv
fix
feat
refactor
build
ci
style
test
chore
perf
docs
break
revert
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/stylua.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Format with Stylua

on:
push:
branches: [main]
paths: ["**.lua"]

permissions:
contents: write

jobs:
postprocessing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: format with stylua"
File renamed without changes.
28 changes: 8 additions & 20 deletions kickstart-python.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
-- BOOTSTRAP the plugin manager `lazy.nvim`
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
local lazyIsInstalled = vim.loop.fs_stat(lazypath)
if not lazyIsInstalled then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable",
lazypath,
})
if not vim.uv.fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim"
vim.system({ "git", "clone", "--filter=blob:none", lazyrepo, "--branch=stable", lazypath }):wait()
end
vim.opt.runtimepath:prepend(lazypath)

Expand Down Expand Up @@ -136,7 +129,7 @@ local plugins = {
-- "inject" is a special formatter from conform.nvim, which
-- formats treesitter-injected code. Basically, this makes
-- conform.nvim format python codeblocks inside a markdown file.
markdown = { "inject" },
markdown = { "inject" },
},
-- enable format-on-save
format_on_save = {
Expand Down Expand Up @@ -272,13 +265,13 @@ local plugins = {
"rst",
"ninja",
-- needed for formatting code-blocks inside markdown via conform.nvim
"markdown",
"markdown_inline",
"markdown",
"markdown_inline",
},
},
},

-- semshi for additional syntax highlighting.
-- semshi for additional syntax highlighting.
-- See the README for Treesitter cs Semshi comparison.
-- requires `pynvim` (`python3 -m pip install pynvim`)
{
Expand Down Expand Up @@ -372,7 +365,7 @@ local plugins = {
config = function()
local listener = require("dap").listeners
listener.after.event_initialized["dapui_config"] = function() require("dapui").open() end
listener.before.event_terminated["dapui_config"] = function () require("dapui").close() end
listener.before.event_terminated["dapui_config"] = function() require("dapui").close() end
listener.before.event_exited["dapui_config"] = function() require("dapui").close() end
end,
},
Expand Down Expand Up @@ -417,11 +410,6 @@ local plugins = {
dependencies = "nvim-treesitter/nvim-treesitter",
},

-- better indentation behavior
-- by default, vim has some weird indentation behavior in some edge cases,
-- which this plugin fixes
{ "Vimjas/vim-python-pep8-indent" },

-- select virtual environments
-- - makes pyright and debugpy aware of the selected virtual environment
-- - Select a virtual environment with `:VenvSelect`
Expand Down

0 comments on commit fe02803

Please sign in to comment.