TagStudio icon indicating copy to clipboard operation
TagStudio copied to clipboard

[Feature Request]: Syntax Highlighting in Code File Thumbnails

Open poseidon-rises opened this issue 1 year ago • 1 comments

Checklist

  • [X] I am using an up-to-date version.
  • [X] I have read the documentation.
  • [X] I have searched existing issues.

Description

Add syntax highlighting to thumbnails/previews of code files.

Solution

Create a code media type and apply syntax highlighting to thumbnails and previews. Examples of code file types could include code files themselves as well as metadata and data files, such as .csproj or .json.

Alternatives

No response

poseidon-rises avatar Nov 15 '24 20:11 poseidon-rises

QSyntaxHighlighter does exist, but it seems to be meant more for being used by other Qt widgets, and we would need to specify (or find) syntax highlighting rules for every language we wanted to support. I would say it would make more sense to use a python library for treesitter, like https://github.com/tree-sitter/py-tree-sitter

python357-1 avatar Nov 15 '24 20:11 python357-1