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

681 Commits

Author SHA1 Message Date
David Neto
dcc587e978
wgsl: Fix typo for texel format rgba16float (#779)
Add tests for predeclared types, type-generators, texel formats.
2023-03-28 13:18:56 -07:00
Miek Gieben
8588e37b62
Update iscdhcp xml file (#778)
This updates the ISC dhcp XML lexer. It:

- Fixes functions in function by removed the arglist state, this make
  NameFunction tokens work.
- Adds KeywordType for more words that can open a brace delimited
  section.
- Remove another set of Keyword so that they become NameVariables

Note on that latter point, from what I could scrape together from the
dhcp manual pages is that there exist 150+ directives/keywords in that
syntax, I pondered adding them all, but there lays madness, so sort of
took the middle ground, in the hopes it is useful enough to other folks

Signed-off-by: Miek Gieben <miek@miek.nl>
2023-03-27 13:38:06 -07:00
David Neto
7c08f459bd
Update the main README to point to the lexers/README (#777)
This will make it clearer where the tests are.
When I first contributed I didn't see past the "try it with chromad" instructions.
2023-03-26 15:02:17 -07:00
David Neto
0eecb2ae57
Add WebGPU Shading Language lexer (#776)
https://w3.org/TR/WGSL

Generated from the Pygments lexer I wrote, in
https://github.com/pygments/pygments/pull/2386
2023-03-26 13:19:09 -07:00
ifNil
4f02bc5f68
support HTTP/2 and HTTP/3 (#774) 2023-03-25 15:08:11 -07:00
Miek Gieben
357f0cbe40
dhcpd (#772)
* Add ISC dhcp config lexer

This adds a lexer to parse ISC's dhcpd.conf, https://www.isc.org/dhcp/,
this is EOL, but distributions still carry it.

It has the keywords that I could find and takes some liberty with
LiteralNumber* tokens to return IP, network and MAC addresses.

It may be possible to make this somewhat smaller, but haven't pushed for
that yet.

Signed-off-by: Miek Gieben <miek@miek.nl>

* revert some non-related changes

Signed-off-by: Miek Gieben <miek@miek.nl>

* revert

Signed-off-by: Miek Gieben <miek@miek.nl>

---------

Signed-off-by: Miek Gieben <miek@miek.nl>
2023-03-24 02:58:31 -07:00
Kenneth Jenkins
2672d3c4c3
Add Smali lexer (#765)
Converted from the pygments Smali lexer. Add a basic test case and
update the 'Supported languages' table in the README.
2023-03-23 11:59:08 -07:00
Alec Thomas
b9e3758120 Upgrade goreleaser. v2.7.0 2023-03-21 13:55:45 +11:00
Miek Gieben
f99570764c
cfengine3 xml: add $(..) to match NameVariable (#768)
$(...) is a valid syntax (believe called nakedvar) that should also be
matched by the CFEngine3 lexer.

Fixes: #767

Signed-off-by: Miek Gieben <miek@miek.nl>
v2.6.0
2023-03-17 12:01:29 -07:00
Miek Gieben
cc132eda75
cfengine3 (#766)
* Fix CommentPreproc

Macros (i.e.) CommentPreproc need to be anchored as they are only
allowed to be put on the start of the line. This also solved the
conflict with nakedvar @(....).

Signed-off-by: Miek Gieben <miek@miek.nl>

* Fix NameClass

NameClass (`xxx::`) can _also_ contain variables, so add " and $ to the
allowed list in the regexp. This now also needs to be put earlier to
match before any strings.

Signed-off-by: Miek Gieben <miek@miek.nl>

---------

Signed-off-by: Miek Gieben <miek@miek.nl>
2023-03-17 00:08:27 -07:00
Alec Thomas
7e30655df1 Allow custom XML lexers and styles to be loaded from the command-line. 2023-03-17 10:21:26 +11:00
Alec Thomas
0d91785454 Upgrade go + golangci-lint 2023-03-17 09:06:10 +11:00
Guillaume Laforge
b831d1b861
Groovy added a 'record' type and keyword in version 4 (#764) 2023-03-15 12:33:01 -07:00
Siavash Askari Nasr
42c314dbe7
Raku: Change the token type of builtin types to KeywordType (#759) 2023-03-04 17:12:50 +11:00
JakobDev
96a518bb94
[Python]Add match and case to Keywords (#756) 2023-03-03 05:14:44 -08:00
JakobDev
ecb69ce50b
Add Note about testing lexers to Readme (#757) 2023-03-03 05:13:26 -08:00
JakobDev
31310888c4
Fix Playground on Windows (#758) 2023-03-03 04:52:55 -08:00
Joe Mooring
22f3c60f3a
styles/vulcan: Fix background color (#753) 2023-02-26 10:23:55 +11:00
Peter Marheine
ba01b927d3
Add support for Z80 assembly (#751)
This handles most Z80 instructions and commonly-used assembler
directives, but does not impose much structure beyond recognizing those
items.
2023-02-20 23:05:35 -08:00
Austin Eccentrici
3ac94eea73
Add HolyC support (#750) 2023-02-14 23:40:04 -08:00
gempir
1d0ed7f62a increase php priority over phtml
currently phtml takes priority over php, that's odd considering phtml is not very common anymore compared to php
2023-02-12 12:09:33 +11:00
Markus Amshove
a40c95e447 Add support for Natural language 2023-02-08 10:15:33 +11:00
Lovecraftian Horror
4bfa1bbb7c Rust: Add initial support for string interpolation v2.5.0 2023-01-31 13:23:29 +11:00
CosmicHorror
f5f48e206a
Rust: Generalize declaritive and function-like macros (#742) 2023-01-29 19:55:50 -08:00
CosmicHorror
55b0e59213
Rust: Attempt to lex constant idents (#741) 2023-01-30 06:27:19 +11:00
CosmicHorror
87869f8477
Fix rust byte char capture (#740) 2023-01-30 05:37:51 +11:00
CosmicHorror
0ea6503487
Rust: Include starting apostrophe in lifetime / loop label token (#739) 2023-01-29 16:02:56 +11:00
Itamar Haber
633f8e0f55 Removes 'tabindex="0"' from `<pre>' elements 2023-01-20 02:03:49 +11:00
Rasmus Moorats
3d1bc51fa8 add missing type suffixes for nim 2023-01-19 03:23:03 +11:00
CosmicHorror
d5b3291829
Add default diff support (#732) 2023-01-18 17:11:29 +11:00
toshimaru
db073d869d deps: Bump modules for cmd/chromad
- alecthomas/kong
- alecthomas/kong-hcl
- gorilla/csrf
- gorilla/handlers
- gorilla/mux
2023-01-16 01:47:17 +11:00
toshimaru
4553686e33 deps: Bump go modules for cmd/chroma
- alecthomas/kong
- mattn/go-colorable
- mattn/go-isatty
2023-01-16 01:47:17 +11:00
toshimaru
366b9db3fe deps: Bump go modules
- alecthomas/assert
- alecthomas/repr
2023-01-16 01:47:17 +11:00
Siavash Askari Nasr
482cb62ae4 [Rust] Fix string whitespace skip
- Recognize string prefixes as `LiteralStringAffix` token
- Remove an unnecessary rule?
2023-01-15 06:07:12 +11:00
Alec Thomas
4aaf294088
Update issue template to reference playground shareable links 2023-01-13 20:58:55 -08:00
Guillaume Galy
5ca7345671 fix: inconsistent YAML multiline parsing (#475)
When the YAML block scalar (multiline string) syntax is used with only one line of text, the single line is not matched by the current regexp. It currently only works with at least two lines.

This fixes the regexp by adding a special case for a single line after the first indentation in the block.
2023-01-12 23:25:34 +11:00
Alec Thomas
d330b760dc feat: support sharing in playground 2023-01-11 16:37:03 -05:00
Siavash Askari Nasr
0e2db44744 Add -webkit-user-select: none; to support Safari 2023-01-11 02:00:54 +11:00
Alec Thomas
45e3bfb671 Convert bashsessions lexer to XML 2022-12-12 07:41:42 +11:00
silverwind
aecedef97d Rename 'Base Makefile' lexer to 'Makefile' v2.4.0 2022-11-15 18:57:46 +11:00
silverwind
740e4b85b2 Add systemd .service and .socket to ini lexer
I think these should be pretty un-ambigous. There are more
systemd-related file extensions, but I'm less sure about them, so I left
them out.

Ref: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
2022-11-15 07:45:37 +11:00
John Roos
f07788e465
More improvements to PowerShell lexer (#708) 2022-11-14 11:52:16 -08:00
SerHack
94d785889c
Create Onedark theme (#704) 2022-11-13 00:11:15 -08:00
John Roos
42e542114b
Improved PowerShell lexer (#700) 2022-11-10 20:53:36 -08:00
SerHack
16fd66634d
Fix a bug that ate functions ;) (#702) 2022-11-11 06:05:58 +11:00
SerHack
ee9558d7ac Update c.xml 2022-11-10 08:24:13 +11:00
mhmdanas
877797e70d fix: add CSS gap property 2022-11-08 21:31:42 +11:00
Hannu Hartikainen
5644f41865
Add lexer for BQN (#691)
Based on the Vim syntax highlighting by Marshall Lochbaum[[0]], with number
parsing from PrismJS highlighter by Christopher Rodriguez[[1]].

The lexed types are selected to be as descriptive as possible while
retaining similar groupings to the Vim highlighter, so the highlighted
code looks familiar to BQN users.

[0]: a436a71a08/editors/vim/syntax/bqn.vim
[1]: 859f99a042
2022-11-08 21:25:43 +11:00
l-m
71d4be6869
Lexer support for the stas language (#699) 2022-11-07 21:47:32 +11:00
Gianni Lerro
be4aebd830
Add Vala Lexer (#697) 2022-11-04 17:44:46 -07:00