Commit Graph

145 Commits

Author SHA1 Message Date
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
Vadim Illarionov
37fcb210f2 Ticket #4022: misc/syntax/Syntax.in: add .desktop file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-11-04 11:42:47 +03:00
Andrew Borodin
37f8927bfc misc/syntax/Syntax.in: join ini-base files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-11-04 11:36:55 +03:00
Grzegorz Szymaszek
36bcaef0cf Ticket #4018: add "https://" to Debian sources.list syntax.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-09-21 19:38:55 +03:00
jetpilot
19cc61cf04 Ticket #4010: inprove YAML syntax highlighting.
Add inlined data block highlighting.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-31 19:34:39 +03:00
Marc Ihm
e79391a0f8 Ticket #4005: add yabasic syntax highlighting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-08-17 10:14:44 +03:00
cheese
4135eb6460 Ticket #3991: update RPM spec syntax highlighting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-06-10 21:18:21 +03:00
Lars Wendler
ee08fa9f56 Ticket #3988: mcedit: syntax: add many missing ebuild syntax variables and commands.
- Group commands coming from eclasses
- Add common Makefile variables

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-05-18 17:26:20 +03:00
TerraTech
91d6d55baf Ticket #3981: sh.syntax: allow for indented 'function' highlighting.
This will allow for the following:

  if want_foo; then
      function foobar() {
          echo "foo"
      }
  else
      function foobar() {
          echo "bar"
      }
  fi
  foobar

Signed-off-by: TerraTech <1118433+TerraTech@users.noreply.github.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-04-27 19:17:54 +03:00
Vadim Illarionov
61e390dfc7 Use ini.syntax for systemd cofiguration files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-11 11:40:53 +03:00
Vadim Illarionov
359129b524 Ticket #3975: expand syntax highlighting rules.
Expand file name regexp for sh.syntax.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-03-11 11:37:41 +03:00
Sergii Pylypenko
deceefab74 mcedit: fixed syntax highlighting bug in .c and .cxx syntax scripts
To reproduce, open this .c file in mcedit (remove backslashes):

/* this preprocessor macro is not colorized,
   when there is whitespace before '#' and the next line is not empty */
\  #if not_colorized
int code;

/* this preprocessor macro is colorized properly, the next line is empty */
\  #if colorized

int code2;

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2019-02-09 10:40:43 +03:00
Andrew Borodin
5a2730ae8c misc/syntax/Syntax.in: simplify regex for PO and CUDA syntaxes. 2018-11-24 14:40:42 +03:00
Andrew Borodin
5ca9943cf3 misc/syntax/Syntax.in: fix regex for Meson syntax.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-11-24 14:40:42 +03:00
Vitold S
49945f40c8 Ticket #3940: add Meson syntax highlighting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-10-15 14:33:20 +03:00
Terra
c9fb0c33e3 Ticket #3920: php.syntax - highlight keyword 'null'
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
2018-06-12 21:04:53 +02:00
Sergey Naumov
729f6eef9c Ticket #3893: fix markdown.syntax that doesn't work well for complex files
* Asterisk and underscore contexts don't play well with lists or
  words containing underscores. And given that markdown files
  could contain not only ASCII text, it is better to be conservative
  in detecting contexts.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-05-09 18:12:42 +03:00
Adam Borowski
5eb9bd605e Ticket #3906: ZSTD support.
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2018-03-19 15:00:23 +03:00