Skip to content

Commit

Permalink
Added syntax for FreeFEM++, MARTe2 framework and CUE (#322)
Browse files Browse the repository at this point in the history
* added support to FreeFEM++ syntax

* added support to MARTe2 Configuration language

* updated with new language support

* Update language_marte.lua

* Update plugins/language_marte.lua

Co-authored-by: Guldoman <[email protected]>

* added languages

* fixed whitespace and new line

* Added CUE syntax

* reformatted

* removed tabs

* fixed issue with char

* formatted and removed duplicated key

* fixed lname and added structure identifier

* removed lite-xl version

* Update plugins/language_cue.lua

Co-authored-by: Guldoman <[email protected]>

---------

Co-authored-by: Martino Ferrari <[email protected]>
Co-authored-by: Guldoman <[email protected]>
  • Loading branch information
3 people authored Oct 23, 2023
1 parent e0f0abb commit c7c43e0
Show file tree
Hide file tree
Showing 5 changed files with 755 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,11 @@ but only with a `url` must provide a `checksum` that matches the existing plugin
| [`language_containerfile`](https://github.com/FilBot3/lite-xl-language-containerfile)\* | Syntax for [Containerfile](https://github.com/containers/common/blob/main/docs/Containerfile.5.md)/[Dockerfile](https://docs.docker.com/engine/reference/builder/) |
| [`language_crystal`](https://github.com/Tamnac/lite-plugin-crystal)\* | Syntax for the [Crystal](https://crystal-lang.org) programming language |
| [`language_csharp`](plugins/language_csharp.lua?raw=1) | Syntax for the [C#](http://csharp.net) programming language |
| [`language_cue`](plugins/language_cue.lua?raw=1) | Syntax for the [CUE](http://cuelang.org) definition and validation programming language |
| [`language_d`](plugins/language_d.lua?raw=1) | Syntax for the [D](https://dlang.org/) programming language |
| [`language_dart`](plugins/language_dart.lua?raw=1) | Syntax for the [Dart](https://dart.dev/) programming languiage |
| [`language_diff`](plugins/language_diff.lua?raw=1) | Syntax for diff and patch files |
| [`language_edp`](plugins/language_edp.lua?raw=1) | Syntax for [FreeFEM++](http://freefem.org) programming language |
| [`language_elixir`](plugins/language_elixir.lua?raw=1) | Syntax for the [Elixir](https://elixir-lang.org) programming language |
| [`language_elm`](plugins/language_elm.lua?raw=1) | Syntax for the [Elm](https://elm-lang.org) programming language |
| [`language_env`](https://github.com/anthonyaxenov/lite-xl-env-syntax)\* | Syntax for the [env](https://hexdocs.pm/dotenvy/dotenv-file-format.html) (dotenv) files |
Expand Down Expand Up @@ -219,6 +221,7 @@ but only with a `url` must provide a `checksum` that matches the existing plugin
| [`language_lobster`](plugins/language_lobster.lua?raw=1) | Syntax for [Lobster](https://strlen.com/lobster/) programming language |
| [`language_lox`](plugins/language_lox.lua?raw=1) | Syntax for the [Lox](http://craftinginterpreters.com/the-lox-language.html) programming language, featured in the book '[Crafting Interpreters](http://craftinginterpreters.com/)'. |
| [`language_make`](plugins/language_make.lua?raw=1) | Syntax for the Make build system language |
| [`language_marte`](plugins/language_marte.lua?raw=1) | Syntax for [MARTe2](https://vcis.f4e.europa.eu/marte2-docs/master/html/index.html) configuration language |
| [`language_meson`](plugins/language_meson.lua?raw=1) | Syntax for the [Meson](https://mesonbuild.com) build system language |
| [`language_miniscript`](plugins/language_miniscript.lua?raw=1) | Syntax for the [MiniScript](https://miniscript.org) programming language |
| [`language_moon`](plugins/language_moon.lua?raw=1) | Syntax for the [MoonScript](https://moonscript.org) scripting language |
Expand Down
24 changes: 24 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,14 @@
"mod_version": "3",
"tags": ["language"]
},
{
"description": "Syntax for the [CUE](http://cuelang.org) definition and validation programming language",
"version": "0.1",
"path": "plugins/language_cue.lua",
"id": "language_cue",
"mod_version": "3",
"tags": ["language"]
},
{
"description": "Syntax for the [D](https://dlang.org/) programming language",
"version": "0.2",
Expand All @@ -660,6 +668,14 @@
"mod_version": "3",
"tags": ["language"]
},
{
"description": "Syntax for [FreeFEM++](http://freefem.org) programming language",
"version": "0.1",
"path": "plugins/language_edp.lua",
"id": "language_edp",
"mod_version": "3",
"tags": ["language"]
},
{
"description": "Syntax for the [Elixir](https://elixir-lang.org) programming language",
"version": "0.2",
Expand Down Expand Up @@ -901,6 +917,14 @@
"mod_version": "3",
"tags": ["language"]
},
{
"description": "Syntax for [MARTe2](https://vcis.f4e.europa.eu/marte2-docs/master/html/index.html) configuration language",
"version": "0.1",
"path": "plugins/language_marte.lua",
"id": "language_marte",
"mod_version": "3",
"tags": ["language"]
},
{
"description": "Syntax for the [Meson](https://mesonbuild.com) build system language",
"version": "0.1",
Expand Down
41 changes: 41 additions & 0 deletions plugins/language_cue.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
-- mod-version:3
local syntax = require "core.syntax"

syntax.add {
name = "CUE",
files = "%.cue$",
comment = "//",
patterns = {
{ pattern = "//.*", type = "comment" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "`", "`", '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
{ pattern = "0[oO_][0-7]+i?", type = "number" },
{ pattern = "-?0x[%x_]+i?", type = "number" },
{ pattern = "-?%d+_%di?", type = "number" },
{ pattern = "-?%d+[%d%.eE]*f?i?", type = "number" },
{ pattern = "-?%.?%d+f?i?", type = "number" },
{ pattern = "[%a_][%w_]*%.", type = "literal" },
{ pattern = "[%a_][%w_]*", type = "symbol" },
{ pattern = "#[%a][%w_]*", type = "keyword2" },
-- operators
{ pattern = "[%+%-=/%*%^%%<>!~|&%?:%.]", type = "operator" },
},
symbols = {
["package"] = "keyword",
["import"] = "keyword",
["let"] = "keyword",
["for"] = "keyword",
["true"] = "literal",
["false"] = "literal",
["string"] = "keyword2",
["bool"] = "keyword2",
["number"] = "keyword2",
["uint32"] = "keyword2",
["int32"] = "keyword2",
["uint16"] = "keyword2",
["int16"] = "keyword2",
["uint8"] = "keyword2",
["float"] = "keyword2",
}
}
Loading

0 comments on commit c7c43e0

Please sign in to comment.