Commit Graph

162 Commits

Author SHA1 Message Date
Morthimer McMare
cd8355bfa8 Ticket #4556: color definitions in the "c.syntax" highlight file.
Definitions are provided for:
- Various punctuation (divided into 9 groups);
- Preprocessor;
- Keywords;
- Data types;
- Data type qualifiers;
- Numbers (can be different for the integer, hexadecimal, octal and floatpoint representations);
- Strings and escaped characters;
- Comments (with keywords like "TODO:");
- Labels.
In total 32 "defines"...

Based on the original "c.syntax" file, this version includes most of the content from C89..C23.

Closes MidnightCommander/mc#203.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-07-25 21:38:44 +03:00
Dmitry Atamanov
9fb4261334 mcedit: update C and C++ syntax highlightings.
Closes MidnightCommander/mc#195.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-04-07 16:01:47 +03:00
purdeaandrei
147f28ab24 Ticket #4519: mcedit: fix php.syntax.
Highlight comment located in any place of line, not from start only.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2024-01-28 11:29:39 +03:00
TobiasW
f78f9b2eda Ticket #4509: support for lzo/lzop compression format.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-11-26 17:27:11 +03:00
Bogdan107
626d02998a mcedit: fix colorize *.zsh files.
I need colorizing content of the "*.zsh" files in mcedit.
With "zsh(env|rc)" regexp rule, only "*.zshenv" and "*.zshrc" files are will be colorized.
With "zsh(env|rc)?" regexp rule, "*.zsh" files will be colorized too.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:55 +03:00
bill auger
ef2172ee5a PKGBUILD.syntax: recognize 'b2sums'.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
srem1
5a10a33c9e ruby.syntax: add puts
puts == print + "\n" very often use

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-08-04 21:04:54 +03:00
Gyorgy Rotter
1536b5acf4 Ticket #4470: mcedit: add B language syntax highlight.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-31 20:29:45 +03:00
dsilakov
0d5a989e7e Ticket #4469: add syntax highlighting for Jenkinsfiles.
Jenkinsfiles follow Groovy syntax, treat them accordingly

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-05-26 20:19:15 +03:00
JJ Andresson
9ad896f5e7 mcedit: use diff syntax highlighting for git commit messages
...when GIT_EDITOR=mcedit (closes MidnightCommander/mc#85).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2023-01-28 21:38:05 +03:00
Timur Shemsedinov
4c287bb73e mcedit: support modern ECMAScript syntax in TypeScript (closes MidnightCommander/mc#172).
Signed-off-by: Timur Shemsedinov <timur.shemsedinov@gmail.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2023-01-28 21:38:05 +03:00
Timur Shemsedinov
1d1c37834a Aadd syntax highlighting for modern ECMAScript (closes MidnightCommander/mc#172).
Signed-off-by: Timur Shemsedinov <timur.shemsedinov@gmail.com>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2023-01-28 21:38:05 +03:00
Kian-Meng Ang
5001232704 Fix various typos in the source code (closes MidnightCommander/mc#177).
Found via `codespell -S
po,doc,./misc/syntax,./src/vfs/extfs/helpers/README.it -L
parm,rouge,sav,ect,vie,te,dum,clen,wee,dynamc,childs,ths,fo,nin,unx,nd,iif,iterm,ser,makrs,wil`

Co-authored-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Kian-Meng Ang <kianmeng@cpan.org>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2023-01-28 21:38:05 +03:00
Andrew Borodin
cea7d35209 Ticket #4320: syntax/Syntax: document location of syntax files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-12-18 14:26:30 +03:00
Alexander Fadeev
87bfef7317 Ticket #4412: add TOML (Tom's Obvious Minimal Language) syntax highlighting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-11-26 09:44:24 +03:00
Pavel Shumskii
971de9651c Ticket #4059: improve YAML multiline blocks syntax highliting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-07-09 20:10:31 +03:00
Bogdan Pylypenko
08ab71d49b Ticket #4384: mceditor: add syntax file for Privoxy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-07-03 15:46:22 +03:00
Grzegorz Szymaszek
d0cc71e48a Ticket #4322: add basic DOT/Graphviz syntax highlighting.
DOT is a graph description language, described at
<https://graphviz.org/doc/info/lang.html>. The new syntax file
recognizes the basic language keywords and syntax; known node,
edge, graph, etc. properties; comments; character strings.

The syntax file seems to work well with various DOT files found
in the Linux kernel sources as well as with the MNT Reform 2.0D-4
System Diagram.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-12-20 20:51:43 +03:00
Grzegorz Szymaszek
d5481d2684 Ticket #4319: fix SPICE syntax file to recognize where control script context ends
Since .endc was defined both as the context end delimiter and a context
keyword, it was not recognized as the former and the control script
context, once started, would never be finished. This issue can be
noticed, for example, in wrong syntax highlighting of the .end command
if it was preceded by a control script.

Fix the issue by making the control script context exclusive and
highlighting the .control and .endc keywords in the default context
instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-12-05 16:31:41 +03:00
Grzegorz Szymaszek
52d9d7946f Ticket #4316: add basic Ngspice syntax highlighting.
Add basic support for highlighting Ngspice/SPICE (http://ngspice.sourceforge.net/)
circuit description files syntax. Two main contexts are defined:
- the default context, where the circuit is described,
- the control script context (between .control and .endc).

The default context highlights dot commands, circuit element instance
names and model types. The control script context highlights supported
functions/commands and known variables. Both contexts highlight comments
and line continuation marks.

Other than two FIXMEs, it is a known issue the first line of the file is
part of the default context, while in most cases it would contain the
file title.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-12-04 07:13:23 +03:00
Michael Stilkerich
4973eb00bb Ticket #4286: mcedit: fix errors in syntax definitions.
Fixed:
  - use of "grey" instead of "gray" (same for "lightgray");
  - use of space in keywords;
  - typos.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-09-04 18:36:27 +03:00
Andrew Borodin
443a9c897b Ticket #4252: change pattern for OpenRC scripts syntax highlighting.
Use an empty patter (^$) that doesn't match any file name. In this
case, only the shebang is used to detect syntax highlighting rules for
OpenRC scripts.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-05-31 09:07:05 +03:00
TerraTech
3d5fadd2bb Ticket #4246: add syntax highlighting for for openrc-run scripts.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-05-29 14:21:10 +03:00
Sergii Pylypenko
4be98a52ba Ticket #4250: mcedit: add syntax highlighting for .json files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-05-29 14:05:48 +03:00
Purdea Andrei
e50a4d0e25 Ticket# 4215: support syntax highlighting for Verilog/SystemVerilog header files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-03-13 08:12:43 +03:00
Witold Baryluk
b01fea54a7 Ticket #4140: update python.syntax.
Add nonlocal, async, await keywoards.

nonlocal: added in Python 3.0 in 2006:

https://docs.python.org/3.0/whatsnew/3.0.html
https://www.python.org/dev/peps/pep-3104/
https://docs.python.org/3/reference/simple_stmts.html#the-nonlocal-statement

async, await: added in Python 3.5 in 2015:

https://docs.python.org/3.5/whatsnew/3.5.html#what-s-new-in-python-3-5
https://www.python.org/downloads/release/python-350/
https://www.python.org/dev/peps/pep-0492/
https://docs.python.org/3/reference/compound_stmts.html#async-def
https://docs.python.org/3/reference/compound_stmts.html#the-async-for-statement
https://docs.python.org/3/reference/compound_stmts.html#the-async-with-statement
https://docs.python.org/3/reference/expressions.html#await-expression
https://docs.python.org/3/glossary.html#term-coroutine
https://docs.python.org/3/library/asyncio-task.html
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-19 16:26:46 +03:00
Marek Černocký
c8649068d3 Ticket #4194: add .c++ and .h++ extensions for highlight.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-02-18 16:52:21 +03:00
Marco Ciampa
18a300e64f Fixed reference to Yabasic sintax file 2020-12-28 11:58:15 +01:00
Milan Voves
e6315c1c75 Swift syntax
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-24 16:34:43 +03:00
Purdea Andrei
1f4b5ae396 Ticket #4098: syntax highlighting: support .ino files.
Add the .ino extension to the list of extensions recognized by the c++
syntax highlighter.

.ino is used by the Arduino IDE, and a number of other IDEs, and it's effectively
the same thing as a c++ source file, but with some added magic, such as auto-generated
function prototypes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-21 19:58:56 +03:00
Andrew Borodin
9311136158 Ticket #4054: broken syntax highlighting for shell scripts.
Revert "Ticket #3981: sh.syntax: allow for indented 'function' highlighting."

This reverts commit 91d6d55baf.

The syntax highlighting of shell scripts in mcedit misbehaves around
matches of "function blabla()" inside literal quotes. It applies syntax
highlighting as if it was function definition in normal conditions (out
of literal quotes), breaking the colouring of whatever follows.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 20:13:37 +03:00
Andrey Brozhko
91e4d8150f Ticket #4088: mcedit: add Kotlin syntax highlighting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 20:06:04 +03:00
Purdea Andrei
f32614ae7f verilog syntax: clarify that also refers to systemverilog,
...and make sure it also takes .sv files as well.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 19:44:02 +03:00
Purdea Andrei
06f2c6093e verilog syntax: added some missing operators
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 19:42:10 +03:00
Purdea Andrei
281ba2a35e verilog syntax: reorganized and added missing compiler directives
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 19:42:02 +03:00
Purdea Andrei
81122ffcae verilog syntax: reorganized and added missing system tasks and system functions
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 19:41:50 +03:00
Purdea Andrei
32878bdd3d verilog syntax: added IEEE1800-2009 and 2012 missing keywords
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 19:41:19 +03:00
Purdea Andrei
6351c4bc49 verilog syntax: added IEEE1800-2005 missing keywords
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 19:41:12 +03:00
Purdea Andrei
0cdb39d76f verilog syntax: added IEEE1364-2005 missing keywords
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 19:40:56 +03:00
Purdea Andrei
b0927b0627 verilog syntax: added IEEE1364-2001 missing keywords
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 19:40:47 +03:00
Purdea Andrei
91fdf29635 verilog syntax: added missing ieee1364-1995 keywords
...and moved ieee1364-2001 keyword in separate section.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 19:40:25 +03:00
Purdea Andrei
2df64d7b9c Ticket #4087: verilog syntax: removing keyboards attribute, endattribute, strength
Keywords attribute, endattribute, strength are not a reserved keywords in any
verilog standard. I can find a few references to these saying that they
were reserved keywords in OVI LRM version 2.0 (a version of verilog
before it was standardized), but this LRM is not available. The OVI LRM
version 1.0 didn't include these keywords, and none of the IEEE standards
include these keywords. I also tried the syntax highlighter of two
commercial tools, and they don't show attribute/endattribute as keywords.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-06-06 19:38:46 +03:00
Andrew Borodin
2532d62666 verilog.syntax: make preprocessor keywords sorted. 2020-05-17 18:48:18 +03:00
alexbodn@gmail.com
61691ea3e8 Ticket #1987: mcedit: add Cobol syntax highlighting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-05-04 08:34:05 +03:00
Elijah Zarezky
ca7b13d658 Improvement of RPM spec syntax highlighting.
Add %dnl macro introduced in RPM-4.15.0.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-05-01 17:35:47 +03:00
Vladislav Zavjalov
cc9b5faf08 Ticket #4062: mceditor: expand shebang regexp for tcl.syntax.
Add shebangs with wish É tclsh.

Original bugreport is https://bugzilla.altlinux.org/37545.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-02-15 18:24:32 +03:00
Marcel Pol
2720085877 Ticket #4061: add support for opus audio.
The following patch adds support for opus audio files.

The executable opusinfo is part of opus-tools package.
Xmms and play are able to play opus files.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-02-11 21:12:44 +03:00
Grzegorz Szymaszek
aa2904eebc Ticket # 4060: escape backslashes in PHP single quote string.
In PHP strings delimited with single quotes, there are two characters
that can be escaped: \ and '. For example, the PHP string 'a\'b\\c\d'
could be printed as ‘a'b\c\d’.

Escaping quotes was already possible with the PHP syntax file. This
commit adds support for escaping backslashes. It fixes mcedit’s syntax
highlighting on PHP strings that end with \\ (like 'aaa\\').

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-02-08 19:45:59 +03:00
Grzegorz Szymaszek
abb7df9f26 Ticket #4041: mcedit: update Debian sources.list syntax highlighting.
Add support for many URI specifications (like tor+https) and options
(like arch).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-12-08 10:12:26 +03:00
Stanislav Brabec
96cf569e96 Ticket #4037: add new scriptlets to spec.syntax.
Add scriptlets %pretrans, %posttrans and %verifyscript to the RPM spec file syntax.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-11-30 18:19:04 +03:00