497 Commits

Author SHA1 Message Date
Nabeel Sherazi
9183fbe640 Include --options-with-hyphens in statement regex (#3863) 2025-11-05 19:07:24 +01:00
Neko Box Coder
115e560ee2 Fixing regression introduced by #3310 with missing word boundary (#3891) 2025-10-19 13:13:30 +02:00
Mikko
815ca0b6d8 fix c++ highlighting for binary literal with digit separator and suffix (#3870) 2025-10-11 21:59:02 +02:00
Neko Box Coder
ed970eede3 Reordering triple quotes string to be evaluated first for groovy syntax (#3858) 2025-09-07 11:40:13 +02:00
ZRZ
bbea2a3f28 Fix highlighting for auto in C++ (#3836) 2025-09-02 19:46:35 +02:00
Jöran Karl
b37fa2e34d Merge pull request #3846 from JoeKar/revert/syntax-rules
syntax: Revert removal of `rules: []`
2025-09-02 19:28:06 +02:00
Mikko
4b2f8aa828 make arduino filetype detection less aggressive (#3848) 2025-09-01 20:46:10 +02:00
Jöran Karl
52f629cee7 syntax: Fix invalid escape of ' in php 2025-08-31 18:58:15 +02:00
Jöran Karl
d9245d9659 syntax: Add the empty rules: [] to the files currently "missing" them 2025-08-31 18:53:45 +02:00
Jöran Karl
3fd2fe3cc7 Revert "doc: syntax: Add hint about incompatibilities to previous versions"
This reverts commit 02e69dddbe.
2025-08-31 13:53:34 +02:00
Jöran Karl
0277516eef Revert "syntax: Remove empty rules in regions"
This reverts commit a9b513a28a.
2025-08-31 13:47:53 +02:00
deepdring
b8057f28c6 refactor: use a more modern writing style to simplify code (#3834)
Signed-off-by: deepdring <deepdrink@icloud.com>
2025-08-26 02:00:51 +02:00
Mikko
6b15bf3b19 fix shell highlighting for variables with leading underscore (#3833) 2025-08-20 20:51:34 +02:00
remisalmon
86a9fac7ef Fix variable expansion regex in fish syntax (#3830) 2025-08-16 13:30:47 +02:00
Aleksey Sakovets
bce573b6c9 Add syntax highlighting for meson build system (#3236)
* Add syntax highlighting for meson build system

It is basically a port of upstream syntax highlighting for vim,
but a bit less noisy (e.g numbers are not colored).

* meson.yaml: fix meson_options.txt detection

* meson.yaml: remove empty rules

* meson.yaml: add highlighting for operators and brackets

* meson.yaml: rearrange the keywords to be in alphabetical order

* meson.yaml: add highlighting for numbers
2025-08-12 19:36:09 +02:00
cutelisp
f97cba34d2 Small Documentation Improvement (#3786) 2025-07-25 21:02:33 +02:00
Dmytro Maluka
dbdf753f27 Merge pull request #3310 from Neko-Box-Coder/CppAndCLiteralSeparatorFix
Changing syntax behavior for single quote to allow binary and hex literal separator
2025-07-20 16:14:32 +02:00
Jonathan
cf92f77fdc Add syntax highlighting for PRQL (#3313)
* Add syntax highlighting for PRQL

Adds a syntax highlighting mode for the PRQL query language.

PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement.
https://prql-lang.org/
https://github.com/PRQL/prql

* Update runtime/syntax/prql.yaml

Co-authored-by: Mikko <Andriamanitra@users.noreply.github.com>

* Update runtime/syntax/prql.yaml

Co-authored-by: Mikko <Andriamanitra@users.noreply.github.com>

* Update runtime/syntax/prql.yaml

Co-authored-by: Mikko <Andriamanitra@users.noreply.github.com>

* Update runtime/syntax/prql.yaml

Co-authored-by: Mikko <Andriamanitra@users.noreply.github.com>

* Update prql.yaml

* Update prql.yaml

---------

Co-authored-by: Mikko <Andriamanitra@users.noreply.github.com>
2025-07-08 11:45:29 +02:00
theredcmdcraft
97b5e3506e Nftables improvements (#3517) 2025-06-20 21:00:25 +02:00
Mikko
29dc892009 Fix Ruby syntax highlighting for predefined variables (#3778) 2025-06-20 20:53:46 +02:00
Codemanticism
bf255b6c35 rust.yaml: Add the keyword "union" (#3759) 2025-05-25 12:59:59 +02:00
Dmytro Maluka
1bd86a8f79 Build constraints: switch to new syntax
Make gofmt happy about that.
2025-03-24 22:54:32 +01:00
Jöran Karl
02e69dddbe doc: syntax: Add hint about incompatibilities to previous versions 2025-03-15 17:45:45 +01:00
Sertonix
78f0a9cd30 doc: syntax: remove syntax_checker.go from README.md
The patch is taken from:
https://github.com/zyedidia/micro/pull/2738

The mentioned file was already removed with the following commit:
fe3186ba9d

The `micro` binary itself takes now care of validating the syntax definitions
and informs about possible issues.
2025-03-15 14:58:14 +01:00
Dmytro Maluka
0b75031ac5 syntax: asm: highlight C-like comments (#3696)
Different assemblers have different syntaxes for comments: ";", "#",
"!", "|", "@", "*" and finally C-like comments "//" and "/* ... */".

Micro currently highlights only ";". This is causing various problems
with broken highlighting with other types of comments (i.e. those not
recognized by micro as comments), when the text in those comments
contains special characters, causing wrong highlighting of text after
them.

On the other hand, highlighting comments like "#", "|" etc would cause
conflicts with other syntax elements, e.g. constants in ARM assembly,
preprocessor directives, arithmetic expressions etc.

So let's highlight at least C-like comments. They are quite commonly
used and they are not so likely to cause conflicts with other syntax
elements.
2025-03-15 14:29:45 +01:00
Jöran Karl
98356765c1 Merge pull request #3273 from JoeKar/fix/save-atomically
save: Perform write process safe
2025-03-08 14:04:41 +01:00
edwloef
3c68655f33 add syntax highlighting for new rust keywords and types (#3677) 2025-03-01 13:58:30 +01:00
Jöran Karl
6e8daa117a ioutil: Remove deprecated functions where possible 2025-02-28 18:57:53 +01:00
niten94
0985d2cadd sh.yaml: Match parameter expansions with braces using \w 2025-02-23 11:39:11 +08:00
niten94
4abd966a99 sh.yaml: Match valid parameter expansions without braces
Match parameter expansions with valid name only in shell syntax file
when there are no braces.
2025-02-15 07:54:22 +08:00
med-ab
56c1f75bad Add .cjs (common javascript) to javascript syntax definition (#3539) 2024-11-20 14:51:51 +01:00
Owen McGrath
c8eeb788cb Update java.yaml (#3526) 2024-10-31 23:01:56 +01:00
theredcmdcraft
ac73f18191 Create nftables.yaml (#3325)
Created nftables syntax highlighting
2024-10-06 13:04:32 +02:00
Jöran Karl
596da97626 syntax/syntax_converter: Remove empty rules in regions 2024-09-09 18:32:30 +02:00
Jöran Karl
a9b513a28a syntax: Remove empty rules in regions 2024-09-09 18:32:30 +02:00
Oleksandr
5428b3fda2 Add Swift shebang to syntax (#3451)
The Swift compiler can be run in "interpreter" mode, so it can run Swift "scripts" if they have a proper shebang and no file extension.
2024-09-05 18:41:39 +02:00
James M Corey
2308bc5555 Fix rust syntax file to recognize byte strings and c strings. (#3452)
In rust, there are some prefixes that may be part of the string literal.
String literals of the form b"test" (and br##"test"## etc) are byte
strings (as opposed to unicode strings), and similarly, string literals
of the form c"test" are C zero-terminated strings.  Hence, added optional
prefixes to each of the string regular expressions so the prefix will be
recognized as part of the string.

Built and tested after fix.

Co-authored-by: James Corey <jc-git@neniam.net>
2024-09-05 18:41:17 +02:00
James M Corey
d8f7928b74 Add an OpenSCAD syntax file (#3410)
Update from PR feedback:
Coalesce multiple statement rules into one.
Coalesce multiple constant.number into one.

Update from more PR feedback:
Fix special variables (starting with $)--var must start with $,
i.e. x$y is not a valid special var, but you can have x=$y.

Compiled and tested again with latest changes.

Co-authored-by: James Corey <jc-git@neniam.net>
2024-09-04 18:49:55 +02:00
mystieneko
47fb91e333 add more css commands (#3436) 2024-08-31 13:03:00 +02:00
Mikko
cc67b801ce Improve Haskell syntax highlighting (#3373)
* Improve Haskell syntax highlighting

* add syntax highlighting for binary literals
2024-08-31 12:59:40 +02:00
Juan Francisco Cantero Hurtado
f23c2b6115 Raku syntax: Add .rakutest/.nqp extensions. Rework filename regex. (#3406)
With @niten94, @JoeKar and @Andriamanitra.
2024-08-31 12:44:10 +02:00
Jöran Karl
cc195b6a96 syntax/json: Add comment support to the syntax highlighting (#3434)
* allow comments in json

* syntax/json: Add colon to `TODO` comments

---------

Co-authored-by: Sertonix <83883937+Sertonix@users.noreply.github.com>
2024-08-19 22:16:42 +02:00
m-kru
fa9bc6b98c Small fix for VHDL syntax (#3375) 2024-08-19 21:11:24 +02:00
rei
63ffc40a6b Fix Ocaml syntax highlighting (#3427)
* Fix (kinda) Ocaml syntax highlighting

* Remove functions rule

* Highlight character with escape sequence

* Add suggested changes
2024-08-19 21:03:41 +02:00
Mikko
352580a50a detect .pyw files (#3346) 2024-06-14 19:52:02 +02:00
Alex Rønne Petersen
55f45ce8ff Fix highlighting of load and reference directives in Cake syntax. (#3341) 2024-06-13 19:57:39 +02:00
Alex Rønne Petersen
9face7484e Update Zig syntax to handle ZON (Zig Object Notation) files. (#3329) 2024-06-09 17:57:22 +02:00
Neko Box Coder
7b50629094 Adding more keywords to signature 2024-06-08 22:58:37 +01:00
Neko Box Coder
27c3e1857a Adding support to single quote separator & char literal error workaround 2024-06-08 22:58:10 +01:00
niten94
4911a56181 Add commands in shell syntax file
Add `break`, `command`, `continue`, `eval`, `exec`, `getopt`, `getopts`,
`trap` and `wait` command in shell syntax file.
2024-05-23 00:59:58 +08:00