From 0d2cc99760bb118736508ac3f89b04387ee3c864 Mon Sep 17 00:00:00 2001 From: Antoine Pouille Date: Mon, 13 Jan 2025 14:58:29 +0100 Subject: [PATCH] Add VSCode extension for syntax coloring --- .../kappa-lang/.vscode/launch.json | 17 ++ .../VSCode_plugin/kappa-lang/.vscodeignore | 4 + .../VSCode_plugin/kappa-lang/CHANGELOG.md | 9 + .../VSCode_plugin/kappa-lang/LGPL-LICENSE | 165 ++++++++++++++++++ .../VSCode_plugin/kappa-lang/README.md | 23 +++ .../kappa-lang/kappa-lang-0.0.1.vsix | Bin 0 -> 6354 bytes .../kappa-lang/language-configuration.json | 28 +++ .../VSCode_plugin/kappa-lang/package.json | 31 ++++ .../kappa-lang/syntaxes/kappa.tmGrammar.json | 101 +++++++++++ .../kappa-lang/vsc-extension-quickstart.md | 29 +++ 10 files changed, 407 insertions(+) create mode 100644 syntax_highlighting_plugins/VSCode_plugin/kappa-lang/.vscode/launch.json create mode 100644 syntax_highlighting_plugins/VSCode_plugin/kappa-lang/.vscodeignore create mode 100644 syntax_highlighting_plugins/VSCode_plugin/kappa-lang/CHANGELOG.md create mode 100644 syntax_highlighting_plugins/VSCode_plugin/kappa-lang/LGPL-LICENSE create mode 100644 syntax_highlighting_plugins/VSCode_plugin/kappa-lang/README.md create mode 100644 syntax_highlighting_plugins/VSCode_plugin/kappa-lang/kappa-lang-0.0.1.vsix create mode 100644 syntax_highlighting_plugins/VSCode_plugin/kappa-lang/language-configuration.json create mode 100644 syntax_highlighting_plugins/VSCode_plugin/kappa-lang/package.json create mode 100644 syntax_highlighting_plugins/VSCode_plugin/kappa-lang/syntaxes/kappa.tmGrammar.json create mode 100644 syntax_highlighting_plugins/VSCode_plugin/kappa-lang/vsc-extension-quickstart.md diff --git a/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/.vscode/launch.json b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/.vscode/launch.json new file mode 100644 index 0000000000..44a86aba4b --- /dev/null +++ b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/.vscode/launch.json @@ -0,0 +1,17 @@ +// A launch configuration that launches the extension inside a new window +// Use IntelliSense to learn about possible attributes. +// Hover to view descriptions of existing attributes. +// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Extension", + "type": "extensionHost", + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}" + ] + } + ] +} diff --git a/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/.vscodeignore b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/.vscodeignore new file mode 100644 index 0000000000..f369b5e55b --- /dev/null +++ b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/.vscodeignore @@ -0,0 +1,4 @@ +.vscode/** +.vscode-test/** +.gitignore +vsc-extension-quickstart.md diff --git a/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/CHANGELOG.md b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/CHANGELOG.md new file mode 100644 index 0000000000..b5abdff8a5 --- /dev/null +++ b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change Log + +All notable changes to the "kappa-lang" extension will be documented in this file. + +Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. + +## 0.0.1 + +- Initial release diff --git a/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/LGPL-LICENSE b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/LGPL-LICENSE new file mode 100644 index 0000000000..65c5ca88a6 --- /dev/null +++ b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/LGPL-LICENSE @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/README.md b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/README.md new file mode 100644 index 0000000000..c674ce7998 --- /dev/null +++ b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/README.md @@ -0,0 +1,23 @@ +# kappa-lang README + +## Features + +Syntax highlighting for the Kappa language + +## Requirements + +None + +## Extension Settings + +None + +## Known Issues + +None + +## Release Notes + +### 1.0.0 + +Initial release of Kappa syntax highlighting diff --git a/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/kappa-lang-0.0.1.vsix b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/kappa-lang-0.0.1.vsix new file mode 100644 index 0000000000000000000000000000000000000000..806a5b76a36e0c51ea025199a690d1748ffc27a4 GIT binary patch literal 6354 zcmaJ_bySpF-yOQUrMp`~kQ^G6Mvxp}fB}Xf1{g|0x?4b6kPuK{Kw7#%kQQkqR8mUv z!}~7p)w{m;{mnY-dH$Kb&iTcD&fYqjXz1hs05&$j*^B@2^*C19B`N?wg$n>s0ssIo z0uFZZfWTY?ygVQXD98n32ljxs8qK@ROA-e>Y*Sor>n&V}P^Q)4LEWrT$mtBK_4#DQ z7tdYAt;eJqzwla+>j!0t1gEkkesu0V`_W-nwF5VkOxs{t2YXR*wF^E4Q^~T*L1SR; zqTh+IoD7K#*GB$6VMQ(|e;u@TD6pei0tP$x8><`Sc`!ti@?t}Z@%BQV>ppIX)-=m^ z6Z37u9jiW@Nx;3HRZ=Oj_VjATYbYAMCLk=*O zmiF+4$t`Aza^iU20|_wfDo&`!1QS1}q_G=w6dM(fm$N|)MLc8+NK**sDp;xfi7J5a zuqY0Vx=oz?PR=4VeY5*|$R4g?eJs`3pGJD#K`n5%u<7qxSO$)|#KicM}zbiyw4u{?;GnaysPVl}$DyQEMf(Y5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8JWXA3XunFK2n0bI?O!D3=lHNFoG7Ag0&mVY?JZovSxF4;7r4TdCr{@aQFnn z3E;H5PhxXjs_~>^-KQVx zWN$=iN_RyimXd!S_C9J^_emOh#??@mHB`2AWS8zib{Q9I?XOUXo*oizd4u#>&^!qZ7j>ZoglDHBbfO;&oxb6FJ8r!Td5G%o_x}(<6 znVUC8G|Mdu+tfkdAD%uZAZqoxSs7YrU+FMk(tRsKi+Q^9{57Tjp7+P6RmxWv^NY*S zT>}C1XXohl%xia;L;#?{J`BB73a*WE`7FM^Nuoxr0fZh?b|k8<-Q3`|-J?A_joFOY zgjUt*ihQH>`qMcbagkRjPTCvB?Ih|H*P?g}ip6+3rd_?HcD8!$9U?qg{3{_>d2w^^ zaWi-6&+zZkz~)VlujV?^x#O}Y`Q33wLO%sISo}6&)wP?3ByZO^6)`6 z`-=cP(R9QC6lg-C01s10ZE1rrAQ+{TCa4_6fjUSP%@qt-qzy{ITz(1-#B8tc5JlVH zh35&|YmmJ}OSk8OTxw9YoQgF%Ba3f-Dx)(X-%ougVDN9;v8Z0sfeTPR{m=!lkr+WGCzkj#b^oc9v&4?gp z{SC%wn7Md84AEA0IdjKtkfM#F#@k}vv}a}%ip67I^Ui0R>L*uJGC)s$+&UM0w|t?a ziGnJJ_TT;I+mZS!kikD6e~aut+~|K}{M(cJ4*~#y3>LbT@&AuQ_Y2^c&-J^#@{_WD zMNu$4`fr=~!}a|\\=|\\%|\\:|\\#|\\;" + }, + { + "name": "constant.numeric", + "match": "\\b(0x[a-f\\d]+|[-+]?(?:\\.\\d+|\\d+\\.?\\d*)(?:[eE][-+]?\\d+)?)\\b" + } + ] + }, + + "paren-expression": { + "begin": "\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.paren.open" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.paren.close" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + } + } +} diff --git a/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/vsc-extension-quickstart.md b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/vsc-extension-quickstart.md new file mode 100644 index 0000000000..77402690a7 --- /dev/null +++ b/syntax_highlighting_plugins/VSCode_plugin/kappa-lang/vsc-extension-quickstart.md @@ -0,0 +1,29 @@ +# Welcome to your VS Code Extension + +## What's in the folder + +* This folder contains all of the files necessary for your extension. +* `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension. +* `syntaxes/kappa.tmGrammar.json` - this is the Text mate grammar file that is used for tokenization. +* `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets. + +## Get up and running straight away + +* Make sure the language configuration settings in `language-configuration.json` are accurate. +* Press `F5` to open a new window with your extension loaded. +* Create a new file with a file name suffix matching your language. +* Verify that syntax highlighting works and that the language configuration settings are working. + +## Make changes + +* You can relaunch the extension from the debug toolbar after making changes to the files listed above. +* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. + +## Add more language features + +* To add features such as IntelliSense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs + +## Install your extension + +* To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. +* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.