package.json 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. {
  2. "name": "modula2-language",
  3. "displayName": "GNU Modula-2 Language Support",
  4. "version": "0.1.5",
  5. "publisher": "modula2",
  6. "license": "MIT",
  7. "engines": {
  8. "vscode": "^1.90.0"
  9. },
  10. "categories": [
  11. "Programming Languages"
  12. ],
  13. "activationEvents": [
  14. "onLanguage:modula2",
  15. "onLanguage:modula2-definition",
  16. "onLanguage:pascal"
  17. ],
  18. "main": "./out/extension.js",
  19. "contributes": {
  20. "languages": [
  21. {
  22. "id": "modula2",
  23. "aliases": [
  24. "Modula-2",
  25. "modula2"
  26. ],
  27. "extensions": [
  28. ".mod"
  29. ],
  30. "configuration": "./language-configuration.json"
  31. },
  32. {
  33. "id": "modula2-definition",
  34. "aliases": [
  35. "Modula-2 Definition",
  36. "modula2-definition"
  37. ],
  38. "extensions": [
  39. ".def"
  40. ],
  41. "configuration": "./language-configuration.json"
  42. },
  43. {
  44. "id": "pascal",
  45. "aliases": [
  46. "Pascal",
  47. "pascal"
  48. ],
  49. "extensions": [
  50. ".pas",
  51. ".pp",
  52. ".p"
  53. ],
  54. "configuration": "./language-configuration.json"
  55. }
  56. ],
  57. "grammars": [
  58. {
  59. "language": "modula2",
  60. "scopeName": "source.modula2",
  61. "path": "./syntaxes/modula2.tmLanguage.json"
  62. },
  63. {
  64. "language": "modula2-definition",
  65. "scopeName": "source.modula2.definition",
  66. "path": "./syntaxes/modula2-definition.tmLanguage.json"
  67. }
  68. ],
  69. "jsonValidation": [
  70. {
  71. "fileMatch": "modula2.json",
  72. "url": "./modula2-schema.json"
  73. }
  74. ],
  75. "snippets": [
  76. {
  77. "language": "modula2",
  78. "path": "./snippets/modula2.json"
  79. },
  80. {
  81. "language": "modula2-definition",
  82. "path": "./snippets/modula2-definition.json"
  83. }
  84. ],
  85. "configuration": {
  86. "title": "Modula-2",
  87. "properties": {
  88. "modula2.uppercaseKeywords": {
  89. "type": "boolean",
  90. "default": true,
  91. "description": "Uppercase a Modula-2 keyword when the completed token is followed by a non-identifier character."
  92. },
  93. "modula2.format.indentSize": {
  94. "type": "number",
  95. "default": 2,
  96. "minimum": 0,
  97. "maximum": 8,
  98. "description": "Indentation width in spaces for formatted Modula-2 code (ignored when modula2.format.useTabs is on)."
  99. },
  100. "modula2.format.useTabs": {
  101. "type": "boolean",
  102. "default": false,
  103. "description": "Indent formatted Modula-2 code with tabs instead of spaces."
  104. },
  105. "modula2.format.keywordCase": {
  106. "type": "string",
  107. "enum": [
  108. "upper",
  109. "preserve"
  110. ],
  111. "default": "upper",
  112. "description": "Keyword case applied by the formatter. Reserved words written lowercase are uppercased; identifiers that merely look like keywords (e.g. a variable named mod) are left alone."
  113. },
  114. "modula2.format.spaceAroundOperators": {
  115. "type": "boolean",
  116. "default": true,
  117. "description": "Enforce single spaces around operators (:=, =, +, -, *, /, comparisons). Off produces compact code (a+b)."
  118. },
  119. "modula2.format.spaceAfterComma": {
  120. "type": "boolean",
  121. "default": true,
  122. "description": "Enforce a space after each comma. Off produces compact code (a,b)."
  123. },
  124. "modula2.format.spaceBeforeColon": {
  125. "type": "boolean",
  126. "default": false,
  127. "description": "Put a space before the colon in declarations (x : INTEGER instead of x: INTEGER)."
  128. },
  129. "modula2.format.spaceAroundRange": {
  130. "type": "boolean",
  131. "default": true,
  132. "description": "Enforce spaces around .. in ranges ([0 .. 9]). Off produces compact ranges ([0..9])."
  133. },
  134. "modula2.format.emptyLineLimit": {
  135. "type": "number",
  136. "default": 1,
  137. "minimum": 0,
  138. "maximum": 10,
  139. "description": "Maximum consecutive blank lines kept by the formatter."
  140. },
  141. "modula2.format.trimTrailingWhitespace": {
  142. "type": "boolean",
  143. "default": true,
  144. "description": "Remove trailing whitespace on formatted lines."
  145. },
  146. "modula2.format.insertFinalNewline": {
  147. "type": "boolean",
  148. "default": true,
  149. "description": "End formatted files with exactly one newline."
  150. },
  151. "modula2.cocoR.validatorCommand": {
  152. "type": "string",
  153. "default": "/home/eric/Projets/Projets-Modula2/MyWork/Theia/GNU-grammar/bin/GM2",
  154. "description": "Executable that validates a Modula-2 source file using the generated Coco/R parser. Leave empty to disable Coco/R diagnostics."
  155. },
  156. "modula2.cocoR.validatorArguments": {
  157. "type": "array",
  158. "items": {
  159. "type": "string"
  160. },
  161. "default": [
  162. "{file}"
  163. ],
  164. "description": "Arguments passed to the Coco/R validator. Use {file} for the temporary source file."
  165. },
  166. "modula2.pascal.dialect": {
  167. "type": "string",
  168. "enum": [
  169. "p2",
  170. "p4",
  171. "p6",
  172. "pascal",
  173. "turbopascal3",
  174. "freepascal",
  175. "blaise",
  176. "pascals"
  177. ],
  178. "default": "freepascal",
  179. "description": "Pascal dialect used to validate .pas files. Builds: grammars/P2/build/P2, P4/build/P4, P6/build/P6, Pascal/build/PStd, TurboPascal3/build/TP3, FreePascal/build/FPC, Blaise/build/BlaiseV, PascalS/build/PascalS."
  180. },
  181. "modula2.pascal.validators": {
  182. "type": "object",
  183. "default": {},
  184. "description": "Validator command per Pascal dialect, e.g. {\"freepascal\": \"/path/to/FPC\"}. Each command receives the temporary source file as its single argument. Never point these at pcom/psc oracle compilers (they can hang)."
  185. }
  186. }
  187. }
  188. },
  189. "scripts": {
  190. "clean": "rimraf out",
  191. "build": "tsc -p tsconfig.json",
  192. "prepare": "yarn build",
  193. "watch": "tsc -p tsconfig.json --watch"
  194. },
  195. "devDependencies": {
  196. "@types/node": "^24.0.0",
  197. "@types/vscode": "^1.90.0",
  198. "rimraf": "^6.0.1",
  199. "typescript": "^5.9.2"
  200. },
  201. "dependencies": {
  202. "vscode-languageclient": "^9.0.1",
  203. "vscode-languageserver": "^9.0.1",
  204. "vscode-languageserver-textdocument": "^1.0.11"
  205. }
  206. }