Allow existing syntax highlighting definitions to be used for other file extensions
- Dominant language
- Vala
- Stars
- 521
- Forks
- 118
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 14
Description
### Problem
There are a number of requests for syntax highlighting of file formats not currently supported by Gtk.SourceView.
Such requests should properly be made upstream so all users can benefit. However, there is no guarantee that support will ensue in the near future.
As a fallback it may help some users to be able to set Code to use a sufficiently close syntax highlighting definition for a different file format (file extension).
### Proposal
In the language dropdown have a button "+" that brings up a dialog to enter a file extension and a picklist of supported languages. Code would then henceforth apply the desired highlighting to that type of file.
### Prior Art (Optional)
_No response_
Contributor guide
Research direction
Start with the language dropdown and the existing syntax-highlighting integration described in the issue. Trace how supported languages and file extensions are selected, then determine where a custom extension-to-language mapping can be stored and applied; done means the proposed + dialog accepts an extension and language and subsequently applies that highlighting to matching files.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100