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

462 Commits

Author SHA1 Message Date
Siavash Askari Nasr
f6d1db5fa5 Change some colors, Add a new variation 2021-05-02 17:24:08 +10:00
Siavash Askari Nasr
1231145de8 Add doom-one style 2021-05-02 17:24:08 +10:00
Stephen Afam-Osemene
d6bdd14670 sort lexers with lower case 2021-05-02 17:23:18 +10:00
Siavash Askari Nasr
373b6b7849 Fix SCSS properties, add missing operator and keywords 2021-04-29 23:01:28 +10:00
Alec Thomas
a09abba7fc Update golangci-lint so we can force use of LazyLexer. 2021-04-29 12:10:06 +10:00
Alec Thomas
7e282be495 Update golangci-lint so we can force use of LazyLexer. 2021-04-29 12:08:28 +10:00
Cameron Moore
f3874594e7
Convert raku to lazy lexer (#479) 2021-04-29 11:54:41 +10:00
JamesColeman-AH
15b75a69b8
File name matches and mime matches should be moved to phtml from php lexer (#477) 2021-04-29 06:55:55 +10:00
Siavash Askari Nasr
d4eca2a5b3
Svelte Lexer Improvements (#478) 2021-04-28 17:34:34 +10:00
Alec Thomas
3626d89d3e Fix lint. 2021-04-28 09:59:01 +10:00
Vukašin Manojlović
575caac139 Improve lexer for Solidity 2021-04-28 09:56:06 +10:00
Vukašin Manojlović
cab6ebcf1b Add basic lexer for Svelte 2021-04-28 09:54:44 +10:00
Zhangyuan Nie
e86123a191 better markdown lexer 2021-04-28 08:56:27 +10:00
Siavash Askari Nasr
9de08fc6c8
Add Raku lexer (#476) 2021-04-28 08:55:14 +10:00
Alec Thomas
c44c690de2 Switch chromad to go:embed and show version. v0.9.1 2021-04-25 08:25:51 +10:00
Alec Thomas
7410d4a2dc Update chromad modules. 2021-04-25 08:07:12 +10:00
Alec Thomas
f235772881 Update Slack link. v0.9.0 2021-04-25 08:02:56 +10:00
Pablo Seminario
9866a75161 Fix a typo into the lables regex for PromQL lexer
The correct label matching operator is `!~` instead of `~!`.
2021-04-25 08:01:36 +10:00
Pablo Seminario
b790655195 Fix PromQL lexer to support values enclosed within single quotes
Values for labels could now be enclosed within single or double quotes.
2021-04-25 08:01:36 +10:00
Guillermo León
d11bdacff4 Add AL lexer 2021-04-24 08:00:45 +10:00
jmert
f4cddf039f
Update Julia syntax highlighting from pygments (#472) 2021-04-18 14:00:13 +10:00
Zhangyuan Nie
d67a2bfdc2
fix: synthesisable entries are ignored when cloned (#465) 2021-04-11 15:06:10 +10:00
Lee Holmes
41b886a7fd Simplify the cmdlet ("NameBuiltin") rule
This change simplifies the NameBuiltin pattern for cmdlets so that it highlights all cmdlets (i.e.: Invoke-Foobar) and not just ones built into PowerShell. It also places these as higher priority than language keywords, so you don't get odd formatting for Foreach-Object and similar.
2021-04-10 12:50:44 +10:00
Carl Gay
eb257ed1bb Add a Dylan lexer 2021-04-07 15:27:41 +10:00
Carl Gay
a9e4a4ebe5 Fix link to pygments-lexers.txt
Was labelled as pygments-lexers.go
2021-04-03 16:59:56 +11:00
Daichi Hayashi
9dc3c8c529
Add new style called "xcode-dark" (#460) 2021-03-24 07:33:54 +11:00
Steven Penny
7a68f3e25d LiteralNumberHex: underscore support
Most languages allow for underscore in number literals. Fix support for a few
languages. References:

- https://docs.python.org/reference/lexical_analysis.html#integer-literals
- https://golang.org/ref/spec#Integer_literals
- https://php.net/language.types.integer
2021-03-03 12:57:43 +11:00
Alec Thomas
d72f847198
Create FUNDING.yml 2021-03-01 16:56:27 +11:00
Govind Gnanakumar
b20de6333c Create new style - "vulcan"
This is a new theme / style, inspired by Doom Emacs's One Doom Theme
2021-02-08 18:25:03 +11:00
Alec Thomas
e6d871d955 Support lone '$' in Go templates. 2021-02-08 12:24:52 +11:00
Koki Fukuda
c49d52b472 Add mcfunction lexer 2021-02-08 12:17:35 +11:00
Cameron Moore
59126c5b32
Add NewLazyLexer to defer rules definitions and reduce init costs (#449)
Add NewLazyLexer and MustNewLazyLexer which accept a function that
returns the rules for the lexer.  This allows us to defer the rules
definitions until they're needed.

Lexers in a, g, s, and x packages have been updated to use the new lazy
lexer.
2021-02-08 12:16:49 +11:00
Alec Thomas
5da831672d Fix a few bugs including sub-lexers adding additional newlines when
EnsureNL is true.
2021-02-06 20:13:50 +11:00
Alec Thomas
2a1e1a1bf4 Add EnsureNL to C/Java lexers.
Fixes #396.
2021-02-06 11:56:46 +11:00
Alec Thomas
305a0397ac Update to latest dlclark/regexp2.
Fixes #424.
2021-02-06 10:09:08 +11:00
Kenneth Shaw
7dbcddc70e Change Text token to TextWhitespace token in SQL lexers
For consistency with other lexers, convert the Text token on whitespace
to TextWhitespace.
2021-01-26 17:02:28 +11:00
Carlos Henrique Guardão Gandarez
898761d8ab Move lexers to correct folders 2021-01-05 06:26:36 +11:00
nocd5
5b9087ac14 Fix CSS lexer
Fix function that include parenthesis shows a wrong error
2020-12-24 06:54:06 +11:00
Diego Henrique Oliveira
6e272cfd92 Introduce the Nord theme
This commit adds the Nord theme as an option. This theme is fully
documented in the official website: https://www.nordtheme.com
2020-12-06 11:05:56 +11:00
silverwind
b351ea7b29 Add various alternate file extensions to lexers
These should be pretty clear cases.
2020-12-03 10:47:43 +11:00
Steven Penny
881d54f096 Improve number literals for several languages
Using these examples:

~~~
0x21
1_000
1e3
~~~

Several languages failed that support these syntax. Here are ones I found:

Lexer      | 0x21 | 1_000 | 1e3
-----------|------|-------|-----
C#         | fail | fail  | fail
Go         |      | fail  |
JavaScript |      | fail  | fail
PHP        |      | fail  |
Python     |      | fail  |
Ruby       |      |       | fail

I fixed these issues, and added tests.
2020-11-22 08:30:29 +11:00
Pablo SEMINARIO
74f5402d5e Update table of supported languages v0.8.2 2020-11-12 11:03:15 +11:00
Pablo SEMINARIO
473ed23c2a Update table.py to write changes on README.md
Write the up-to-date list of the supported languages directly on the
README.md file in order to avoid manual copy/paste actions.
2020-11-12 11:03:15 +11:00
Pablo SEMINARIO
c788380af6 Minor code formatting changes using Black
Replace single by double quotes to keep consistency.
2020-11-12 11:03:15 +11:00
Pablo SEMINARIO
eb0e31fc05 Add PromQL lexer
It also includes several test examples
2020-11-11 17:15:50 +11:00
Steven Penny
552ad244cf Rust multi-line strings
Quoting Rust documentation

> Line-breaks are allowed in string literals. A line-break is either a newline
> (U+000A) or a pair of carriage return and newline (U+000D, U+000A).

https://doc.rust-lang.org/reference/tokens.html#string-literals
2020-11-07 07:49:09 +11:00
Alvaro Aleman
ab61726cdb Make linkeable lines a link to themselves
Currently its already possible to make line lumbers linkeable. Getting
such a link however requires the end user to look at the pages source
and then to manually edit the URL, which is not a great UX.

This PR changes that to make the line numbers a link to themselves, so
clicking on them gives a link to that line that can then be passed
around, similiar to e.G. GitHub.
2020-11-03 21:31:04 +11:00
Yuki Okushi
9eb358bc3f
Update Rust keywords/types (#419)
* Remove unreserved keywords

* Add some newer keywords and types

* Harden Rust lexer test
2020-10-31 08:01:35 +11:00
nyaayaya
9b3cf51c84 zig: Detect visual separators in integer literals
Zig docs: "// underscores may be placed between two digits as a visual
separator"
2020-10-30 22:50:45 +11:00
zeitchef
e3a674cca9 Add base16-snazzy style 2020-10-29 19:59:52 +11:00