Commit graph

424 commits

Author SHA1 Message Date
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
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
USAMI Kenta
37ed9dfe1e
PHP: Add enum and keyword, and modify types (#2204)
* Add enum keyword to PHP (8.1) syntax

* Specify only keywords that are valid as type declarations as PHP types

boolean, integer and resource are not valid type name.

* Add match keyword to PHP (8.2) syntax
2022-07-17 12:16:17 -07:00
Ethan Kinnear
6948cc88ef
Register Brewfiles as Ruby files (#2432)
A `Brewfile` (sometimes named `.Brewfile`) is a bundler for Homebrew packages.
Brewfiles are written in Ruby and are functionally similar to Gemfiles.

`homebrew-bundle` on GitHub: <https://github.com/Homebrew/homebrew-bundle>.
`brew bundle` Manpage: <https://docs.brew.sh/Manpage#bundle-subcommand>.
2022-06-08 00:07:59 +01:00
Ruzie
25a19e2f21
fix: add "unknown" type (#2445) 2022-06-08 00:07:38 +01:00
Mikko
c57c5c04e5
Julia syntax improvements (#2415)
* fix D syntax highlighting for integer literals with underscores

* improve julia syntax highlighting for strings, chars and operators
2022-05-15 13:00:59 -07:00
Lars Müller
656e0a8a7b
Lua syntax highlighting: Various fixes (#2426) 2022-05-15 13:00:44 -07:00
Lars Müller
176d1aa17a
Fix syntax highlighting of single-quoted strings (#2425) 2022-05-15 13:00:29 -07:00
Lars Müller
db3afc1c0d
Fix Lua number syntax highlighting (#2409)
* Fix Lua number syntax highlighting

* Number RegEx: Fix hex exponent

The hex exponent doesn't support hex digits, only decimals.
2022-04-28 15:28:28 -07:00
ftphikari
d3b9b37b07
runtime/syntax: add rudimentary Odin support (#2296)
Odin is a general-purpose programming language with distinct typing,
built for high performance, modern systems, and built-in data-oriented
data types. The Odin Programming Language, the C alternative for
the joy of programming. The Data-Oriented Language for Sane Software
Development.

https://odin-lang.org/
https://odin-lang.org/docs/overview/
https://github.com/odin-lang/Odin
2022-02-11 14:15:34 -08:00
Shura
9ece5c8a3f
Perl syntax improvement (#2359)
* Perl syntax improvement

Fixed \" inside strings
Fixed comment coloring
Improved integer, float, strings variable coloring
Added regex coloring

* Update perl.yaml
2022-02-11 14:13:27 -08:00
Andrew
f20179519f
Detect more file types for git syntax highlighting (#2330)
* Update git-commit.yaml

This will enable syntax highlighting for merge commit messages

* Update git-commit.yaml
2022-01-08 19:51:15 -08:00
Juan Francisco Cantero Hurtado
3a1ec088e2
Raku syntax: fix comments (#2318)
Code:
 # sub xyz(Str is encoded("utf8")) returns int32 is native("asdf") { * }
2021-12-31 18:51:53 -05:00