Open LinXP opened 2 years ago
I had a quick look on it. I was not aware that it is this simple. The steps mentioned in the response to your issue at linguist appear to be performed already. PureBasic already is registered as a language. Obviously something is not right yet as it is not working. This needs further investigation.
The language itself was added a long time ago, but without syntax highlighting, it did not exist at that time.
to add, follow steps 2 and 5, script/add-grammar https://github.com/JaneSmith/MyGrammar
then your repository will appear here: https://github.com/github/linguist/tree/master/vendor/grammars
An example of successfully adding syntax highlighting https://github.com/github/linguist/commit/71002dfb650d57dce103b13a640a4f90f8c997da
$ script/add-grammar https://github.com/peterthomashorn/purebasic-language-for-sublime-text
Checking Docker is installed and running
Registering new submodule: https://github.com/peterthomashorn/purebasic-language-for-sublime-text.git
Reactivating local git directory for submodule 'vendor/grammars/purebasic-language-for-sublime-text'.
latest: Pulling from linguist/grammar-compiler
Digest: sha256:69d3b118b74e31ea72b4320cfd80c1c559b4174fcf7478c4b28c6d1d17f860bf
Status: Image is up to date for linguist/grammar-compiler:latest
docker.io/linguist/grammar-compiler:latest
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
source 'vendor/grammars/purebasic-language-for-sublime-text' contains no grammar files
It appears like it is necessary to convert the YAML syntax definition for Sublime Text into something compatible with TextMate and its property list based format for language grammars to extend linguist. I will leave it at that for today and think how to continue. To keep projects and goals separated, maybe this needs to be outsourced into a dedicated downstream repository which contains an automatically converted property list which is compatible with TextMate.
I have a request to add syntax highlighting support to linguist (Github). for this, it remains to complete two steps https://github.com/github/linguist/discussions/5855#discussioncomment-2557330 Tnx