From 9d1423798388ad5db78e2805b5b8353b4a0d75be Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 11 Jan 2025 22:28:33 +0800 Subject: [PATCH] Add Xmake language --- .gitmodules | 3 ++ grammars.yml | 2 ++ lib/linguist/languages.yml | 9 ++++++ samples/Xmake/xmake.lua | 20 ++++++++++++ vendor/grammars/xmake-lua.tmbundle | 1 + .../git_submodule/xmake-lua.tmbundle.dep.yml | 31 +++++++++++++++++++ 6 files changed, 66 insertions(+) create mode 100644 samples/Xmake/xmake.lua create mode 160000 vendor/grammars/xmake-lua.tmbundle create mode 100644 vendor/licenses/git_submodule/xmake-lua.tmbundle.dep.yml diff --git a/.gitmodules b/.gitmodules index 1612334af..ef20ba7d1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1449,6 +1449,9 @@ [submodule "vendor/grammars/xc.tmbundle"] path = vendor/grammars/xc.tmbundle url = https://github.com/graymalkin/xc.tmbundle +[submodule "vendor/grammars/xmake-lua.tmbundle"] + path = vendor/grammars/xmake-lua.tmbundle + url = https://github.com/xmake-io/xmake-lua.tmbundle [submodule "vendor/grammars/xml.tmbundle"] path = vendor/grammars/xml.tmbundle url = https://github.com/textmate/xml.tmbundle diff --git a/grammars.yml b/grammars.yml index e030d65dc..6d4a40ea0 100644 --- a/grammars.yml +++ b/grammars.yml @@ -1313,6 +1313,8 @@ vendor/grammars/wollok-sublime: - source.wollok vendor/grammars/xc.tmbundle: - source.xc +vendor/grammars/xmake-lua.tmbundle: +- source.xmake vendor/grammars/xml.tmbundle: - text.xml - text.xml.xsl diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 5b9d9ef6f..0e3f1f4d4 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -8798,3 +8798,12 @@ xBase: tm_scope: source.harbour ace_mode: text language_id: 421 +Xmake: + type: programming + color: "#22a079" + filenames: + - xmake.lua + tm_scope: source.xmake + ace_mode: text + language_id: 422 + diff --git a/samples/Xmake/xmake.lua b/samples/Xmake/xmake.lua new file mode 100644 index 000000000..cf6882d09 --- /dev/null +++ b/samples/Xmake/xmake.lua @@ -0,0 +1,20 @@ +set_project("sample") +set_version("1.0.0") + +add_rules("mode.debug", "mode.release") + +option("test", {default = false, description = "the test option"}) + +add_requires("zlib", {system = false}) + +target("test") + set_kind("binary") + add_files("src/*.c") + add_packages("zlib") + if is_plat("windows") then + add_defines("WIN32") + end + if has_config("test") then + add_defines("TEST") + end + diff --git a/vendor/grammars/xmake-lua.tmbundle b/vendor/grammars/xmake-lua.tmbundle new file mode 160000 index 000000000..2e8dfc454 --- /dev/null +++ b/vendor/grammars/xmake-lua.tmbundle @@ -0,0 +1 @@ +Subproject commit 2e8dfc454ed0f6aef121cfd6fe2be6812eeb6427 diff --git a/vendor/licenses/git_submodule/xmake-lua.tmbundle.dep.yml b/vendor/licenses/git_submodule/xmake-lua.tmbundle.dep.yml new file mode 100644 index 000000000..9a289bc65 --- /dev/null +++ b/vendor/licenses/git_submodule/xmake-lua.tmbundle.dep.yml @@ -0,0 +1,31 @@ +--- +name: xmake-lua.tmbundle +version: 2e8dfc454ed0f6aef121cfd6fe2be6812eeb6427 +type: git_submodule +homepage: https://github.com/xmake-io/xmake-lua.tmbundle +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2022 最萌小汐 + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, includinR without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: []