Skip to content

feat(extra): add Pygments style classes and plugin#705

Open
joshuadavidthomas wants to merge 9 commits into
folke:mainfrom
joshuadavidthomas:pygments
Open

feat(extra): add Pygments style classes and plugin#705
joshuadavidthomas wants to merge 9 commits into
folke:mainfrom
joshuadavidthomas:pygments

Conversation

@joshuadavidthomas

Copy link
Copy Markdown
Contributor

Description

Adds support for Pygments with custom Style classes for each theme. I tried to keep the token style mapping as close as possible to the LSP and Treesitter styles.

NOTE: Just a quick note on why this extra is not just using the template system only and instead defining and adding the core tokens and the style mappings as a module level function. There are many other tools that also leverage the Pygments token definitions, so this is here in case later on down the line that extra can just reuse these definitions.

Related Issue(s)

N/A

Screenshots

None yet. Will try to update with some later.

@joshuadavidthomas joshuadavidthomas changed the title feat(extra): add Pygments style classes feat(extra): add Pygments style classes and plugin Mar 31, 2025
@joshuadavidthomas
joshuadavidthomas force-pushed the pygments branch 2 times, most recently from 42995de to 25d88e3 Compare April 1, 2025 00:29
@github-actions

github-actions Bot commented May 1, 2025

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 30 days with no activity.

@github-actions github-actions Bot added the stale This issue or PR has been inactive for a while label May 1, 2025
@folke folke added the size/xl Extra large PR (100+ lines changed) label Oct 19, 2025
@github-actions github-actions Bot removed the stale This issue or PR has been inactive for a while label Oct 20, 2025
folke pushed a commit that referenced this pull request Oct 23, 2025
## Description

Adds an extra for the aider CLI tool. 

Depends on #705 -- if that PR is rejected, this one will need to be
altered to remove the references to the Pygments code theme.

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

Initial launch (shows tools, user, and warning output):

![image](https://github.com/user-attachments/assets/1745089e-3d47-4c8b-ab00-7a831c85236f)

Command context menu:

![image](https://github.com/user-attachments/assets/1e6bc4dd-6191-4c46-81a7-2de20e638ffa)

General LLM chat:

![image](https://github.com/user-attachments/assets/24e4a9fc-4cc2-4ac9-b87d-e6431a96ed47)

Code block with Pygments syntax highlighting:

![image](https://github.com/user-attachments/assets/452dba1f-357a-4c6d-bf09-42e30c49fee9)

Error output:

![image](https://github.com/user-attachments/assets/91cb762a-65b6-4335-8ec6-55d956bdab02)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extras size/xl Extra large PR (100+ lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants