Merge pull request #23 from barrettruth/feat/treesitter-diff-highlights
feat: add treesitter highlights for diff files
This commit is contained in:
commit
b496f26e29
3 changed files with 4 additions and 68 deletions
47
.github/workflows/quality.yaml
vendored
47
.github/workflows/quality.yaml
vendored
|
|
@ -11,7 +11,6 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
lua: ${{ steps.changes.outputs.lua }}
|
lua: ${{ steps.changes.outputs.lua }}
|
||||||
python: ${{ steps.changes.outputs.python }}
|
|
||||||
markdown: ${{ steps.changes.outputs.markdown }}
|
markdown: ${{ steps.changes.outputs.markdown }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -25,10 +24,6 @@ jobs:
|
||||||
- '*.lua'
|
- '*.lua'
|
||||||
- '.luarc.json'
|
- '.luarc.json'
|
||||||
- '*.toml'
|
- '*.toml'
|
||||||
python:
|
|
||||||
- 'scripts/**/*.py'
|
|
||||||
- 'pyproject.toml'
|
|
||||||
- 'uv.lock'
|
|
||||||
markdown:
|
markdown:
|
||||||
- '*.md'
|
- '*.md'
|
||||||
|
|
||||||
|
|
@ -72,48 +67,6 @@ jobs:
|
||||||
directories: lua
|
directories: lua
|
||||||
configpath: .luarc.json
|
configpath: .luarc.json
|
||||||
|
|
||||||
python-format:
|
|
||||||
name: Python Format Check
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: changes
|
|
||||||
if: ${{ needs.changes.outputs.python == 'true' }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install uv
|
|
||||||
uses: astral-sh/setup-uv@v4
|
|
||||||
- name: Install ruff
|
|
||||||
run: uv tool install ruff
|
|
||||||
- name: Check Python formatting with ruff
|
|
||||||
run: ruff format --check .
|
|
||||||
|
|
||||||
python-lint:
|
|
||||||
name: Python Lint Check
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: changes
|
|
||||||
if: ${{ needs.changes.outputs.python == 'true' }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install uv
|
|
||||||
uses: astral-sh/setup-uv@v4
|
|
||||||
- name: Install ruff
|
|
||||||
run: uv tool install ruff
|
|
||||||
- name: Lint Python files with ruff
|
|
||||||
run: ruff check .
|
|
||||||
|
|
||||||
python-typecheck:
|
|
||||||
name: Python Type Check
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: changes
|
|
||||||
if: ${{ needs.changes.outputs.python == 'true' }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install uv
|
|
||||||
uses: astral-sh/setup-uv@v4
|
|
||||||
- name: Install dependencies with mypy
|
|
||||||
run: uv sync --dev
|
|
||||||
- name: Type check Python files with mypy
|
|
||||||
run: uv run mypy .
|
|
||||||
|
|
||||||
markdown-format:
|
markdown-format:
|
||||||
name: Markdown Format Check
|
name: Markdown Format Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -9,26 +9,6 @@ repos:
|
||||||
files: \.lua$
|
files: \.lua$
|
||||||
pass_filenames: true
|
pass_filenames: true
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
||||||
rev: v0.14.3
|
|
||||||
hooks:
|
|
||||||
- id: ruff-format
|
|
||||||
name: ruff (format)
|
|
||||||
files: \.py$
|
|
||||||
- id: ruff
|
|
||||||
name: ruff (lint imports)
|
|
||||||
args: ['--fix', '--select=I']
|
|
||||||
files: \.py$
|
|
||||||
|
|
||||||
- repo: local
|
|
||||||
hooks:
|
|
||||||
- id: mypy
|
|
||||||
name: mypy (type check)
|
|
||||||
entry: uv run mypy
|
|
||||||
language: system
|
|
||||||
args: ['.']
|
|
||||||
pass_filenames: false
|
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||||
rev: v4.0.0-alpha.8
|
rev: v4.0.0-alpha.8
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,10 @@ function M.apply()
|
||||||
|
|
||||||
hi('gitCommitSummary', { fg = cs.background })
|
hi('gitCommitSummary', { fg = cs.background })
|
||||||
|
|
||||||
hi('@attribute.diff', { fg = cs.background })
|
hi('@attribute.diff', { fg = cs.blue })
|
||||||
|
hi('@diff.minus', { fg = cs.red })
|
||||||
|
hi('@diff.plus', { fg = cs.green })
|
||||||
|
link('Normal', { '@string.special.path', '@variable.parameter' })
|
||||||
hi('DiffAdd', { bg = cs.diff_add, fg = cs.green }, { '@text.diff.add', 'diffAdded' })
|
hi('DiffAdd', { bg = cs.diff_add, fg = cs.green }, { '@text.diff.add', 'diffAdded' })
|
||||||
hi('DiffDelete', { bg = cs.diff_delete, fg = cs.red }, { '@text.diff.delete', 'diffRemoved' })
|
hi('DiffDelete', { bg = cs.diff_delete, fg = cs.red }, { '@text.diff.delete', 'diffRemoved' })
|
||||||
hi('DiffChange', { bg = cs.diff_change, fg = cs.blue })
|
hi('DiffChange', { bg = cs.diff_change, fg = cs.blue })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue