1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-21 21:17:50 +02:00

763 Commits

Author SHA1 Message Date
Aru Sahni
678b799ad6
Add a lexer for the Materialize SQL dialect () 2023-12-08 11:21:23 +11:00
Alec Thomas
c74f557ed2 Add renovate v2.12.0 2023-12-02 07:26:45 +11:00
Mohammed Anas
d77dc8ab51
Add Hare lexer () 2023-11-29 10:00:30 +11:00
Daniel
234600703b
Add an Alloy lexer () 2023-11-26 08:52:31 +11:00
Daniel
08be6f023f
Add an Agda lexer () 2023-11-25 19:54:04 +11:00
codiacdev
d9f6ed634e
added: rule to objectpascal lexer ()
* 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 () 2023-11-24 06:50:30 +11:00
Rik
7d4db86648
Add Microsoft Dax () 2023-11-22 20:53:27 +11:00
codiacdev
1cda665d1b
fixed: number formats in objectpascal lexer ()
* 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 () 2023-11-18 21:58:01 +11:00
codiacdev
07a90a93dd
added: ObjectPascal lexer ()
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
Alec Thomas
96a12e377e fix: bad path normalisation v2.11.1 2023-11-13 08:41:30 +11:00
Alec Thomas
09953ff50f fix: attempt to load lexer files before using Get()
File loading runs after Get(), but Get() always succeeds so it would
never load a file.
v2.11.0
2023-11-13 08:22:22 +11:00
eric-j-ason
fe96ea49ef
Add test for ucode () v2.10.1 2023-11-09 06:19:06 +11:00
eric-j-ason
8f938d02c5
Create lexer for ucode () 2023-11-08 08:48:10 +11:00
Jonathan
038fab58f6
Add shebang () 2023-11-01 07:18:04 +11:00
Jonathan
48d6be607a
Update prql.xml () 2023-11-01 06:28:48 +11:00
otbutz
810464a509
Update Java lexer () v2.10.0 2023-10-26 20:34:50 +11:00
silverwind
77e9146939
Add file extensions to go_template lexer () 2023-10-21 04:33:35 +11:00
Johan Walles
b127e3569c
Make tty_indexed.go respond to None like tty_truecolour.go () 2023-10-16 01:16:10 +11:00
silverwind
9ae4daed01
Add *.Dockerfile to docker lexer () 2023-10-12 13:47:20 +11:00
Jonathan
2fa6f14bd6
Add PRQL to README () 2023-10-04 04:20:32 +11:00
Jonathan
17597b63b7
Add PRQL language () 2023-10-04 02:30:36 +11:00
Watal M. Iwasaki
7eb0305e1b
lexers/r: Match keywords prior to functions () 2023-09-25 19:57:51 +10:00
Paul Jolly
827bd93b8c
lexers: add initial version of CUE lexer ()
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 
2023-09-24 08:12:43 +10:00
Alec Thomas
9087c632c4 docs: note about Get() being slow due to file matching
Fixes 
2023-09-22 07:00:14 +10:00
Paul Jolly
ccd8d68495
lexers: move to comparing bytes in tests ()
* test: fix up writing up float scores with trailing newlines

This ensures we consistently write a trailing newline when RECORD=true
is set.

* lexers: update expected files using proper newlines

This is the mechanical result of running:

    RECORD=true go test ./lexers

* Assert lexer tests based on equality of byte encodings

This helps to ensure that running RECORD=true go test ./lexers on a
given commit for which the tests pass will not result in any changes in
the working tree.

Notes that as a result of this change, the following command results in
a clean working tree:

    RECORD=true go test ./lexers

Fixes 
2023-09-22 06:35:48 +10:00
Alec Thomas
def00e9c22 chore: update issue templates 2023-09-20 10:41:13 +10:00
Rupus Reinefjord
0b08639048
lexers: support for nim GENERALIZED_TRIPLESTR_LIT () 2023-09-19 23:20:40 +10:00
Anthony Martin
94d11ab996
Update Bicep grammar with recent additions () 2023-09-17 08:29:47 +10:00
silverwind
c64e1bea46
add justfile filename to Makefile lexer () 2023-09-17 08:25:01 +10:00
Carlos Henrique Guardão Gandarez
2b394614b7
Fix GDScript3 analyse regexes () 2023-09-16 13:52:47 +10:00
Alec Thomas
c4527e8d5c fix: C++ comments after #include
Fixes 
v2.9.1
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.
v2.9.0
2023-09-09 12:29:23 +10:00
Alec Thomas
4dd2cbef84 fix: bump to latest dclark/regexp2
Fixes 
2023-09-09 11:46:52 +10:00
SerHack
a242abf7af
Highlights numbers in java () 2023-09-09 11:39:30 +10:00
Aniket Teredesai
6ddeee28d9
update fg color to match latest primer style () 2023-09-09 11:38:14 +10:00
Alan Hamlett
340fd85fd2
Add more hlsl file extensions ()
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 ()
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. () 2023-09-05 07:33:36 +10:00
Carlos Henrique Guardão Gandarez
4796a27270
Set priority for NASM lexer () 2023-08-27 07:56:57 +10:00
Carlos Henrique Guardão Gandarez
be65257e7e
Set priority for INI lexer over Inform 6 () 2023-08-25 10:32:44 +10:00
Carlos Henrique Guardão Gandarez
b5487f4e33
Fix Bash Session lexer name () 2023-08-25 10:27:31 +10:00
Carlos Henrique Guardão Gandarez
c03a781c57
Set priority for GAS lexer () 2023-08-24 23:49:26 +10:00
Carlos Henrique Guardão Gandarez
0fe72e12f1
Add new file extensions to Mathematica lexer () 2023-08-24 23:46:43 +10:00
Carlos Henrique Guardão Gandarez
5b26de04bf
Add missing *.twig file extension () 2023-08-24 11:45:43 +10:00
Carlos Henrique Guardão Gandarez
967600379d
R lexer has priority over Rebol () 2023-08-24 11:45:24 +10:00
Carlos Henrique Guardão Gandarez
efd5efa266
Avoid duplicate lexer if already registered () 2023-08-24 11:44:53 +10:00
Carlos Henrique Guardão Gandarez
954c5ae915
feat: ensure the analyse score is up to 1.0 () 2023-08-24 06:31:46 +10:00
Carlos Henrique Guardão Gandarez
708662a581
feat: improve regex analysers in XML () 2023-08-23 11:51:13 +10:00