1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-02-13 13:28:27 +02:00

120 Commits

Author SHA1 Message Date
silverwind
4c6fdb1d11
Add .avsc to JSON lexer (#920) 2024-01-26 07:20:16 +11:00
Jamie Tanna
ee60f7e738
Add missing token types for Rego + add Rego to README (#919) 2024-01-24 07:45:58 +11:00
Jamie Tanna
ae36e63369
Add support for Rego syntax (#918) 2024-01-23 08:01:11 +11:00
Luke Marzen
ebc34cf4aa
fix file extension typo, remove redundent parens (#914) 2024-01-15 11:26:41 +11:00
Philipp Hagenlocher
641b06ff8c
Fix type operators not being recognised in Haskell (#913) 2024-01-09 12:20:39 +11:00
Silvan Calarco
a8704a8f0b
Add lexer for RPMSpec (#907) 2024-01-03 08:45:31 +11:00
Luke Marzen
eb47752470
Add lexer for Promela (#906) 2024-01-02 16:11:09 +11:00
JakobDev
016768bc14
Add desktop entry lexer (#903) 2023-12-19 22:44:28 +11:00
Aru Sahni
678b799ad6
Add a lexer for the Materialize SQL dialect (#896) 2023-12-08 11:21:23 +11:00
Mohammed Anas
d77dc8ab51
Add Hare lexer (#882) 2023-11-29 10:00:30 +11:00
Daniel
234600703b
Add an Alloy lexer (#892) 2023-11-26 08:52:31 +11:00
Daniel
08be6f023f
Add an Agda lexer (#891) 2023-11-25 19:54:04 +11:00
codiacdev
d9f6ed634e
added: rule to objectpascal lexer (#888)
* added: another rule for objectpascal lexer

* updated: objectpascal lexer testdata

* fixed: processing of control (escape) characters

* updated: test data for objectpascal lexer
2023-11-24 06:53:33 +11:00
silverwind
c5948a61b1
Add Vagrantfile to Ruby lexer (#890) 2023-11-24 06:50:30 +11:00
Rik
7d4db86648
Add Microsoft Dax (#889) 2023-11-22 20:53:27 +11:00
codiacdev
1cda665d1b
fixed: number formats in objectpascal lexer (#887)
* fixed: number formats in objectpascal lexer

added: some missing types
added: special compiler directives

* updated: testdata for objectpascal lexer
2023-11-19 11:05:10 +11:00
tarneo
b5afdeeade
fix(dns): highlight domain names as NameClass (#886) 2023-11-18 21:58:01 +11:00
codiacdev
07a90a93dd
added: ObjectPascal lexer (#883)
Initial version (proposal) of an ObjectPascal lexer

- the assembler state is not in use yet...
- the Intrinsic Routines rule is commented out and probably not needed...
2023-11-17 10:13:06 +11:00
eric-j-ason
8f938d02c5
Create lexer for ucode (#879) 2023-11-08 08:48:10 +11:00
Jonathan
48d6be607a
Update prql.xml (#878) 2023-11-01 06:28:48 +11:00
otbutz
810464a509
Update Java lexer (#873) 2023-10-26 20:34:50 +11:00
silverwind
77e9146939
Add file extensions to go_template lexer (#875) 2023-10-21 04:33:35 +11:00
silverwind
9ae4daed01
Add *.Dockerfile to docker lexer (#868) 2023-10-12 13:47:20 +11:00
Jonathan
17597b63b7
Add PRQL language (#862) 2023-10-04 02:30:36 +11:00
Watal M. Iwasaki
7eb0305e1b
lexers/r: Match keywords prior to functions (#860) 2023-09-25 19:57:51 +10:00
Paul Jolly
827bd93b8c
lexers: add initial version of CUE lexer (#858)
This commit adds a decent first-cut of a lexer for CUE
(https://cuelang.org).

The main aspects of the language are implemented, but there are likely a
number of edge cases not covered, especially when it comes to string
interpolation, but this is a sufficiently decent first cut so as to
warrant merging into the chroma project rather than first working in a
fork.

This was tested locally for visual correctness using

    mkdir -p _examples
    (command cd ./cmd/chroma; go run . --lexer=cue --html --html-inline-styles) < lexers/testdata/cue.actual > _examples/cue.html

and then loading _examples/cue.html in a browser.

Closes #857
2023-09-24 08:12:43 +10:00
Rupus Reinefjord
0b08639048
lexers: support for nim GENERALIZED_TRIPLESTR_LIT (#853) 2023-09-19 23:20:40 +10:00
Anthony Martin
94d11ab996
Update Bicep grammar with recent additions (#850) 2023-09-17 08:29:47 +10:00
silverwind
c64e1bea46
add justfile filename to Makefile lexer (#852) 2023-09-17 08:25:01 +10:00
Carlos Henrique Guardão Gandarez
2b394614b7
Fix GDScript3 analyse regexes (#848) 2023-09-16 13:52:47 +10:00
Alec Thomas
c4527e8d5c fix: C++ comments after #include
Fixes #841
2023-09-09 13:08:27 +10:00
Alec Thomas
40542a6255 refactor: migrate a bunch more Go-based lexers to XML
Also rename some existing XML lexers to their canonical XML name.
2023-09-09 12:29:23 +10:00
Alec Thomas
4dd2cbef84 fix: bump to latest dclark/regexp2
Fixes #805
2023-09-09 11:46:52 +10:00
SerHack
a242abf7af
Highlights numbers in java (#703) 2023-09-09 11:39:30 +10:00
Alan Hamlett
340fd85fd2
Add more hlsl file extensions (#823)
To match GitHub's linguist 916bd8f3df/lib/linguist/languages.yml (L2623)
2023-09-09 11:37:13 +10:00
rome-user
67983f9b27
Update clojure.xml to target EDN (#825)
These changes allow EDN files, together with the commonly used
`application/edn` MIME type, to be highlighted as Clojure syntax.
2023-09-09 11:36:58 +10:00
Andrew Moore
6428fb4e65
Added updated GDScript lexer. (#842) 2023-09-05 07:33:36 +10:00
Carlos Henrique Guardão Gandarez
4796a27270
Set priority for NASM lexer (#839) 2023-08-27 07:56:57 +10:00
Carlos Henrique Guardão Gandarez
be65257e7e
Set priority for INI lexer over Inform 6 (#837) 2023-08-25 10:32:44 +10:00
Carlos Henrique Guardão Gandarez
b5487f4e33
Fix Bash Session lexer name (#840) 2023-08-25 10:27:31 +10:00
Carlos Henrique Guardão Gandarez
c03a781c57
Set priority for GAS lexer (#838) 2023-08-24 23:49:26 +10:00
Carlos Henrique Guardão Gandarez
0fe72e12f1
Add new file extensions to Mathematica lexer (#836) 2023-08-24 23:46:43 +10:00
Carlos Henrique Guardão Gandarez
5b26de04bf
Add missing *.twig file extension (#833) 2023-08-24 11:45:43 +10:00
Carlos Henrique Guardão Gandarez
967600379d
R lexer has priority over Rebol (#835) 2023-08-24 11:45:24 +10:00
Carlos Henrique Guardão Gandarez
708662a581
feat: improve regex analysers in XML (#831) 2023-08-23 11:51:13 +10:00
Alec Thomas
a20cd7e8df
feat: support basic regex analysers in XML (#828)
The `<analyse>` element contains a regex to match against the input, and
a score if the pattern matches.

The scores of all matching patterns for a lexer are summed.

Replaces #815, #813 and #826.
2023-08-22 05:32:23 +10:00
Carlos Henrique Guardão Gandarez
22266635c1
Fix ISCdhcpd filename (#822) 2023-08-19 08:34:51 +10:00
Carlos Henrique Guardão Gandarez
7d74956fb2
Add Pipfile and poetry.lock as a TOML lexer file extension (#821) 2023-08-19 07:02:21 +10:00
Carlos Henrique Guardão Gandarez
42d6da2d90
Add .eex as a Elixir lexer file extension (#820) 2023-08-19 07:01:46 +10:00
Christian Woltering
2aad7403e6
Update C# lexer (#811)
* Fix CommentPreproc regex (and update corresponding test)

* Separate KeywordDeclaration and KeywordConstant from Keyword list (similar to Java lexer).

* Update csharp lexer tests.

* Remove duplicate keyword 'static' from csharp lexer.
2023-08-16 07:46:32 +10:00