diff options
author | Rohan Vashisht <81112205+RohanVashisht1234@users.noreply.github.com> | 2024-04-08 15:00:49 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-08 11:30:49 +0200 |
commit | 7bbb5368e1778e4ea58b64d238b8d8fbb93a0cbc (patch) | |
tree | 2c169abecc489044c720a3f8629da74aed307aea /plugins/language_fortran.lua | |
parent | 5452497648776335ffc20e6081996ec1e63b9557 (diff) | |
download | lite-xl-plugins-7bbb5368e1778e4ea58b64d238b8d8fbb93a0cbc.tar.gz lite-xl-plugins-7bbb5368e1778e4ea58b64d238b8d8fbb93a0cbc.zip |
Integrate `language_{buzz,carbon,fortran,swift}` remote plugins (#417)
* Update manifest.json
* Create language_carbon.lua
* Update language_carbon.lua
* Create language_fortran.lua
* Update language_carbon.lua
* Create language_swift.lua
* Create language_buzz.lua
* Update manifest.json
* Update manifest.json
* Update manifest.json
* Update manifest.json
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
Diffstat (limited to 'plugins/language_fortran.lua')
-rw-r--r-- | plugins/language_fortran.lua | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/plugins/language_fortran.lua b/plugins/language_fortran.lua new file mode 100644 index 0000000..da97a4c --- /dev/null +++ b/plugins/language_fortran.lua @@ -0,0 +1,85 @@ +-- Author: Rohan Vashisht: https://github.com/rohanvashisht1234/ + + +-- mod-version:3 +local syntax = require "core.syntax" + +syntax.add { + name = "Fortran", -- tested ok + files = { + "%.f$", -- tested ok + "%.f90$", -- tested ok + "%.f95$" -- tested ok + }, + comment = "!", -- tested ok + patterns = { + { pattern = { "'", "'", '\\' }, type = "string" }, -- tested ok + { pattern = { '"', '"', '\\' }, type = "string" }, -- tested ok + { pattern = "!.*", type = "comment" }, -- tested ok + { pattern = "%.[%a_][%w_]+%.", type = "normal" }, -- tested ok + { pattern = "[!%-/*?:=><+]", type = "operator" }, -- tested ok + { pattern = "[%a_][%w_]*%f[(]", type = "function" }, -- tested ok + { pattern = "program()%s+()[%a_][%w_]*", type = { "keyword", "normal", "literal" } }, -- tested ok + { pattern = "module()%s+()[%a_][%w_]*", type = { "keyword", "normal", "literal" } }, -- tested ok + { pattern = "use()%s+()[%a_][%w_]*", type = { "keyword", "normal", "literal" } }, -- tested ok + { pattern = "struct()%s+()[%a_][%w_]*", type = { "keyword", "normal", "literal" } }, -- tested ok + + { pattern = "-?%d+[%d%.eE_]*", type = "number" }, -- tested ok + { pattern = "-?%.?%d+", type = "number" }, -- tested ok + { pattern = "[%a_][%w_]*", type = "normal" }, -- tested ok + }, + symbols = { + ["end"] = "keyword", -- tested ok + ["program"] = "keyword", -- tested ok + ["write"] = "keyword", -- tested ok + ["print"] = "keyword", -- tested ok + ["implicit"] = "keyword", -- tested ok + ["integer"] = "keyword", -- tested ok + ["real"] = "keyword", -- tested ok + ["complex"] = "keyword", -- tested ok + ["character"] = "keyword", -- tested ok + ["logical"] = "keyword", -- tested ok + ["allocatable"] = "keyword", -- tested ok + ["subroutine"] = "keyword", -- tested ok + ["do"] = "keyword", -- tested ok + ["call"] = "keyword", -- tested ok + ["extends"] = "keyword", -- tested ok + ["protected"] = "keyword", -- tested ok + ["contains"] = "keyword", -- tested ok + ["else"] = "keyword", -- tested ok + ["then"] = "keyword", -- tested ok + ["if"] = "keyword", -- tested ok + ["cycle"] = "keyword", -- tested ok + ["parameter"] = "keyword", -- tested ok + ["concurrent"] = "keyword", -- tested ok + ["function"] = "keyword", -- tested ok + ["private"] = "keyword", -- tested ok + ["public"] = "keyword", -- tested ok + ["module"] = "keyword", -- tested ok + ["use"] = "keyword", -- tested ok + ["type"] = "keyword", -- tested ok + ["sequence"] = "keyword", -- tested ok + ["struct"] = "keyword", -- tested ok + ["result"] = "keyword", -- tested ok + ["stop"] = "keyword", -- tested ok + ["only"] = "keyword", -- tested ok + + + ["none"] = "keyword2", -- tested ok + ["len"] = "keyword2", -- tested ok + + [".false."] = "keyword2", -- tested ok + [".true."] = "keyword2", -- tested ok + [".eq."] = "keyword2", -- tested ok + [".ne."] = "keyword2", -- tested ok + [".gt."] = "keyword2", -- tested ok + [".lt."] = "keyword2", -- tested ok + [".ge"] = "keyword2", -- tested ok + [".not."] = "keyword2", -- tested ok + [".le."] = "keyword2", -- tested ok + [".or."] = "keyword2", -- tested ok + [".and."] = "keyword2", -- tested ok + [".eqv."] = "keyword2", -- tested ok + [".neqv."] = "keyword2", -- tested ok + } +} |