Commit graph

435 commits

Author SHA1 Message Date
Dmytro Maluka
3f4942cedb syntax parser: reintroduce header regex in .hdr files
Replacing header patterns with signature patterns was a mistake, since
both have their own uses. So restore support for header regex, while
keeping support for signature regex as well.
2024-03-24 04:47:04 +01:00
Jöran Karl
c2c2b2addf
chore: remove repetitive words (follow-up) (#3207) 2024-03-23 20:40:15 +01:00
occupyhabit
8b4e9d2c5e
chore: remove repetitive words (#3205)
Signed-off-by: occupyhabit <wangmengjiao@outlook.com>
2024-03-23 17:02:41 +01:00
Yevhen Babiichuk (DustDFG)
426e6c600f
Fix trailing spaces/tabs in yaml syntax files (#3200)
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
2024-03-22 17:56:09 +01:00
Mikko
f15db6aa30
improve Rust raw string literal highlighting (#3192) 2024-03-21 21:34:54 +01:00
Lizzy Fleckenstein
8a3d83f7c7
Add support for rust async/await keywords (#2556) 2024-03-17 16:47:46 +01:00
Dmytro Maluka
5bfda7b5f6
Merge branch 'master' into fix/file-detection 2024-03-14 04:32:09 +01:00
dimaguy
a01ae92541
Add main tag to html syntax highlighting (#2999)
* Add main tag to html syntax highlighting

* Reorder main
2024-03-13 21:12:38 +01:00
taconi
14dca7d349
syntax: log: add syntax highlight code for log files (#3105) 2024-03-13 19:01:16 +01:00
taconi
fad4e449fb
syntax: kvlang: add syntax highlight code for .kv files (#3106) 2024-03-13 19:00:29 +01:00
Alex Rønne Petersen
88b4498ce0
Some syntax highlighting updates for C and C#. (#3125)
* Update C syntax with keywords up to C23.

* Update C syntax with some GCC extensions.

* Update C# syntax with new keywords up to C# 12.

* Update C# syntax with preprocessor directives.

* Add Cake build script (C#) syntax.

* Add MSBuild (XML) syntax.
2024-03-12 21:20:03 +01:00
Jöran Karl
3fce03dfd0
syntax: sh: Fix command parameter highlighting (#3128) 2024-03-12 21:11:20 +01:00
Yevhen Babiichuk (DustDFG)
fce8db80de
Add go.mod syntax support (#3061)
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
2024-01-17 00:07:51 -08:00
Jöran Karl
3c16df87ee options: Add capability to define the line count parsed for the signature check 2023-10-26 20:59:42 +02:00
Jöran Karl
2aa386f455 syntax: Prepare a concrete signature example for C++ 2023-10-26 20:59:37 +02:00
Jöran Karl
93151f8109 syntax: Prepare a concrete signature example for objective C 2023-10-26 20:48:27 +02:00
Jöran Karl
433879046e Improve file detection with signature check capabilities
This allows more complex detection upon regex rules for a certain amount of
lines.
2023-10-26 20:20:02 +02:00
Jöran Karl
041ee002dd
syntax: sh: Add here document as string region (#2953) 2023-10-22 00:19:59 +02:00
Andrew Geng
2a9a5afbb2
Fix python decorator syntax. (#2827)
1. Python decorators begin a compound statement, so they only appear
   at the start of a line. So match at the line start to avoid giving
   decorator colors to matrix multiplication (@) expressions. Source:
   https://docs.python.org/3/reference/compound_stmts.html#function-definitions

2. Python decorators go to the end of the line and might not include
   parentheses (for example @functools.cache). So instead of matching
   everything until an `(`, just match as many non-`(` characters
   as possible---which both catches the @functools.cache example and
   allows decorator parameters to fall back to the default color.

3. Instead of hardcoding `brightgreen` (which railscast.micro also
   complains about), color decorators as `preproc` (otherwise unused
   by the python syntax files, and arguably the right colorscheme
   group to be using for syntactic sugars anyway). Note this will
   change decorator colors---for example from bright green to kinda
   brown on monokai, and from yellow to more of a light orange on
   railscast.
2023-10-16 11:08:37 +02:00
maddes8cht
fe89df1d4e
fix: recognize .cmd as batch files (#2922) 2023-10-16 10:47:44 +02:00
Jöran Karl
1231d24279
syntax: Fix include of patch in git-commit (#2917) 2023-09-14 13:26:51 -07:00
Jöran Karl
ceaa143c62
highlighter: Fix regions and patterns inside regions (#2840)
* highlighter: Fix regions and patterns inside regions

* highlighting: Remove 2nd recursive highlightRegion() call

...and add limitGroup checks to pattern search.

* yaml: Add TODO type highlighting

* highlighting: Don't stop in highlightRegion() at empty lines

...because possible region line end pattern must be detected.

* syntax/sh: Correct string handling due to additional pattern handling

* syntax/sh: Remove slash in variables

* highlighter: Accept nested region only in case it's within the current reagion

* highlighter: Accept nested patterns only in case it's within the current reagion

* highlighter: Don't search for nesting in case the region end was found at start
2023-07-11 13:49:12 -07:00
rilysh
cb260bf6bf
add new types for zig (#2861) 2023-07-10 23:11:07 -07:00
Mathias Lohne
0c28fbf7a5
Add support for Jenkinsfile syntax (#2750)
Build pipelines for the Jenkins build system are configured in Groovy,
however since their filename is always `Jenkinsfile`, micro doesn't
recognize them as Groovy, and doesn't add syntax highlighting.

This small commit simply adds `Jenkinsfile` and `jenkinsfile` as file
names recognized as Groovy.
2023-07-08 14:08:34 -07:00
William Etheredge
7e64a43af6
Treat Containerfiles as Dockerfiles (#2846)
Containerfiles should be fully compatible with Dockerfiles:
https://github.com/containers/buildah/discussions/3170
2023-07-08 14:07:19 -07:00
Jöran Karl
0859f4aa36
Fix: Syntax highlighting for various issues (#2810)
* highlighter: Fix region & pattern detection

* syntax/sh: Highlight upper case options too

* syntax/c(pp): Try to synchronize the rules to lower the maintenance effort

* syntax/ruby: Fix explicit filename detection in directories

* highlighter: Respect skip rules in regions

* syntax/sh: Fix parameter expansion, cond. flags and generalize filename via ""

* syntax/php|vi: Correct strings in comments to comments only

Additionally improve vimscript comment handling.

* highlighter: Remove problematic start|end check in find(all)Index()

...and additionally remove recursive region end detection
2023-06-05 17:39:12 -07:00
Therk
9cef21ecd6
fixed tex comment detection at start of line (#2764) 2023-04-20 15:21:59 -07:00
Arnaud Vallette d'Osia
9c2ce486a5
Hare (harelang) syntax (#2776) 2023-03-16 13:26:33 -07:00
Sertonix
b0cd92b70f
add restrict to C syntax (#2728) 2023-02-04 14:33:25 -08:00
Sertonix
a929437490
fix unsigned int not highlighted (#2725) 2023-02-01 10:27:33 -08:00
Zachary Yedidia
443ede470d Fix perl syntax file
Fixes #2656
2022-12-09 01:19:19 -08:00
Mark Shachkov
c4d4d5fb7d
Add CUDA syntax support (#2652)
Reusing cpp syntax with minor additions.
2022-12-03 22:17:35 -08:00
Jakob Nybo Nissen
9a10cac598
Improve Julia syntax highlighting (#2643)
Specifically, do not allow multiline single-quote strings, which are not a
thing in Julia. The existing rule broke when adjoints were used, such as
`b = a'`.
The syntax rules have been copied from Rust, which also uses single ticks for
character literals, and also uses the ' symbol for things unrelated to chars.
2022-12-02 17:49:50 -08:00
Aaron Clark
0a080ba03c
Syntax: added support for Smalltalk (#2626) 2022-12-02 17:49:25 -08:00
Valiant-Wolf
48645907ec
Revert adding 'git-rebase-todo' to the main git syntax highlighting file (#2564) 2022-09-16 11:27:38 -07:00
Tomo
3cbbba534c
Add justfile syntax (#2523)
Just is 'just a command runner'. It has syntax inspired by make,
 so `makefile.yaml` was used as a template.
2022-08-21 23:53:04 -07:00
Mishanya
3dcd01f8b8
Add template literal string highlighting to typescript (#2525) 2022-08-21 23:52:47 -07:00
Matthias Thym
639d8a0b08
Add Terraform syntax support (#2279) 2022-07-24 14:10:29 -07:00
john-batch
c226779aca Case-insensitive highlighting of hexadecimal constants 2022-07-24 14:03:53 -07:00
Zachary Yedidia
ce98970c06 Merge branch 'patch-1' of https://github.com/mardukbp/micro into mardukbp-patch-1 2022-07-24 13:59:12 -07:00
Zachary Yedidia
ba11d98fef Merge 2022-07-20 10:16:46 -07:00
Zachary Yedidia
d629008688 Add livemd to markdown extensions 2022-07-20 10:16:42 -07:00
Naftoli Gugenheim
6aa3ea70dc
scala.yaml: add support for .sc extension (#2452)
It's used for Ammonite scripts and Scala worksheets
2022-07-17 12:19:07 -07:00
Mikko
3d4012850a
fix javascript syntax recognizing parts of words as keywords (#2462) 2022-07-17 12:18:56 -07:00
Aaron Clark
5e035efbcb
added support for HolyC (#2473) 2022-07-17 12:18:39 -07:00
yeti
515ec57b77
improve fortran syntax highlighting (#2479)
* support integer highlighting

* add missing keywords and move some to where they fit better

* add missing operators

* fix previous commit

* add and

* add import
2022-07-17 12:18:30 -07:00
raidenXR
fc21fc9816
Gnuplot Syntax highlighting (#2483)
* gnuplot syntax support

* Update gnuplot.yaml

* Add files via upload

* Update gnuplot.yaml
2022-07-17 12:17:11 -07:00
Matthias Thym
77c784def4
Add nushell syntax highlighting (#2486) 2022-07-17 12:16:57 -07:00
Peder Bergebakken Sundt
80bfaf1c54
runtime/syntax/nix: Add support for block comments (#2488) 2022-07-17 12:16:47 -07:00
Waldir Pimenta
d89db64829
syntax/git-rebase-todo.yaml: support more commands (#2495)
For reference, see the list of supported commands in the help text of git's interactive rebase:
https://github.com/git/git/blob/v2.37.1/rebase-interactive.c#L43-L59
2022-07-17 12:16:35 -07:00