package.json 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. {
  2. "name": "xmake-vscode",
  3. "displayName": "XMake",
  4. "description": "Extended XMake support in Visual Studio Code",
  5. "version": "2.3.5",
  6. "publisher": "tboox",
  7. "icon": "res/logo256.png",
  8. "repository": {
  9. "type": "git",
  10. "url": "https://github.com/xmake-io/xmake-vscode"
  11. },
  12. "bugs": {
  13. "url": "https://github.com/xmake-io/xmake-vscode/issues"
  14. },
  15. "license": "Apache-2.0",
  16. "homepage": "https://github.com/xmake-io/xmake-vscode",
  17. "keywords": [
  18. "xmake",
  19. "build",
  20. "c++",
  21. "native",
  22. "lua"
  23. ],
  24. "engines": {
  25. "vscode": "^1.60.0"
  26. },
  27. "categories": [
  28. "Other"
  29. ],
  30. "activationEvents": [
  31. "onDebugResolve:xmake",
  32. "onDebugDynamicConfigurations:xmake",
  33. "workspaceContains:xmake.lua",
  34. "onCommand:xmake.onCreateProject",
  35. "onCommand:xmake.onNewFiles",
  36. "onCommand:xmake.onForceConfigure",
  37. "onCommand:xmake.onCleanConfigure",
  38. "onCommand:xmake.onBuild",
  39. "onCommand:xmake.onBuildAll",
  40. "onCommand:xmake.onRebuild",
  41. "onCommand:xmake.onClean",
  42. "onCommand:xmake.onCleanAll",
  43. "onCommand:xmake.onBuildRun",
  44. "onCommand:xmake.onRun",
  45. "onCommand:xmake.onPackage",
  46. "onCommand:xmake.onInstall",
  47. "onCommand:xmake.onUninstall",
  48. "onCommand:xmake.onDebug",
  49. "onCommand:xmake.onLaunchDebug",
  50. "onCommand:xmake.onMacroBegin",
  51. "onCommand:xmake.onMacroEnd",
  52. "onCommand:xmake.onMacroRun",
  53. "onCommand:xmake.onRunLastCommand",
  54. "onCommand:xmake.onUpdateIntellisense",
  55. "onCommand:xmake.setProjectRoot",
  56. "onCommand:xmake.setTargetPlat",
  57. "onCommand:xmake.setTargetArch",
  58. "onCommand:xmake.setBuildMode",
  59. "onCommand:xmake.setDefaultTarget",
  60. "onCommand:xmake.setTargetToolchain"
  61. ],
  62. "main": "./out/src/extension",
  63. "contributes": {
  64. "keybindings": [
  65. {
  66. "key": "f5",
  67. "command": "xmake.onDebug",
  68. "when": "xmakeEnabled && debuggersAvailable && debugState == 'inactive'"
  69. }
  70. ],
  71. "languages": [
  72. {
  73. "id": "xmake",
  74. "filenames": [
  75. "xmake.lua"
  76. ],
  77. "aliases": [
  78. "XMake"
  79. ],
  80. "icon": {
  81. "light": "./res/logo.svg",
  82. "dark": "./res/logo.svg"
  83. },
  84. "configuration": "./languages/xmake-configuration.json"
  85. }
  86. ],
  87. "breakpoints": [
  88. {
  89. "language": "xmake"
  90. }
  91. ],
  92. "grammars": [
  93. {
  94. "language": "xmake",
  95. "scopeName": "source.xmake",
  96. "path": "./languages/xmake-grammars.json"
  97. }
  98. ],
  99. "taskDefinitions": [
  100. {
  101. "type": "xmake",
  102. "required": [
  103. "task"
  104. ],
  105. "properties": {
  106. "task": {
  107. "type": "string",
  108. "description": "The XMake task to customize"
  109. },
  110. "file": {
  111. "type": "string",
  112. "description": "The XMake file that provides the task. Can be omitted."
  113. }
  114. }
  115. }
  116. ],
  117. "commands": [
  118. {
  119. "command": "xmake.onCreateProject",
  120. "title": "CreateProject",
  121. "category": "XMake"
  122. },
  123. {
  124. "command": "xmake.onNewFiles",
  125. "title": "NewFiles",
  126. "category": "XMake"
  127. },
  128. {
  129. "command": "xmake.onForceConfigure",
  130. "title": "Configure",
  131. "category": "XMake"
  132. },
  133. {
  134. "command": "xmake.onCleanConfigure",
  135. "title": "Clean Configure",
  136. "category": "XMake"
  137. },
  138. {
  139. "command": "xmake.onBuild",
  140. "title": "Build",
  141. "category": "XMake"
  142. },
  143. {
  144. "command": "xmake.onBuildAll",
  145. "title": "BuildAll",
  146. "category": "XMake"
  147. },
  148. {
  149. "command": "xmake.onRebuild",
  150. "title": "Rebuild",
  151. "category": "XMake"
  152. },
  153. {
  154. "command": "xmake.onClean",
  155. "title": "Clean",
  156. "category": "XMake"
  157. },
  158. {
  159. "command": "xmake.onCleanAll",
  160. "title": "CleanAll",
  161. "category": "XMake"
  162. },
  163. {
  164. "command": "xmake.onBuildRun",
  165. "title": "BuildRun",
  166. "category": "XMake"
  167. },
  168. {
  169. "command": "xmake.onRun",
  170. "title": "Run",
  171. "category": "XMake"
  172. },
  173. {
  174. "command": "xmake.onPackage",
  175. "title": "Package",
  176. "category": "XMake"
  177. },
  178. {
  179. "command": "xmake.onDebug",
  180. "title": "Debug",
  181. "category": "XMake"
  182. },
  183. {
  184. "command": "xmake.onLaunchDebug",
  185. "title": "Launch Debug",
  186. "category": "XMake"
  187. },
  188. {
  189. "command": "xmake.onInstall",
  190. "title": "Install",
  191. "category": "XMake"
  192. },
  193. {
  194. "command": "xmake.onUninstall",
  195. "title": "Uninstall",
  196. "category": "XMake"
  197. },
  198. {
  199. "command": "xmake.onMacroBegin",
  200. "title": "BeginMacro",
  201. "category": "XMake"
  202. },
  203. {
  204. "command": "xmake.onMacroEnd",
  205. "title": "EndMacro",
  206. "category": "XMake"
  207. },
  208. {
  209. "command": "xmake.onMacroRun",
  210. "title": "RunMacro",
  211. "category": "XMake"
  212. },
  213. {
  214. "command": "xmake.onRunLastCommand",
  215. "title": "RunLastCommand",
  216. "category": "XMake"
  217. },
  218. {
  219. "command": "xmake.onUpdateIntellisense",
  220. "title": "UpdateIntellisense",
  221. "category": "XMake"
  222. },
  223. {
  224. "command": "xmake.setTargetPlat",
  225. "title": "Set Target Platform",
  226. "category": "XMake"
  227. },
  228. {
  229. "command": "xmake.setTargetArch",
  230. "title": "Set Target Architecture",
  231. "category": "XMake"
  232. },
  233. {
  234. "command": "xmake.setBuildMode",
  235. "title": "Set Build Mode",
  236. "category": "XMake"
  237. },
  238. {
  239. "command": "xmake.setDefaultTarget",
  240. "title": "Set Default Target",
  241. "category": "XMake"
  242. },
  243. {
  244. "command": "xmakeExplorer.buildAll",
  245. "title": "Build All",
  246. "category": "XMake",
  247. "enablement": "view == xmakeExplorer",
  248. "icon": {
  249. "dark": "res/dark/build-icon.svg",
  250. "light": "res/light/build-icon.svg"
  251. }
  252. },
  253. {
  254. "command": "xmakeExplorer.rebuildAll",
  255. "title": "Rebuild All",
  256. "category": "XMake",
  257. "enablement": "view == xmakeExplorer"
  258. },
  259. {
  260. "command": "xmakeExplorer.cleanAll",
  261. "title": "Clean All",
  262. "category": "XMake",
  263. "enablement": "view == xmakeExplorer"
  264. },
  265. {
  266. "command": "xmakeExplorer.build",
  267. "title": "Build",
  268. "category": "XMake",
  269. "enablement": "view == xmakeExplorer",
  270. "icon": {
  271. "dark": "res/dark/build-icon.svg",
  272. "light": "res/light/build-icon.svg"
  273. }
  274. },
  275. {
  276. "command": "xmake.setTargetToolchain",
  277. "title": "toolchain",
  278. "category": "XMake",
  279. "enablement": "view == xmakeExplorer"
  280. },
  281. {
  282. "command": "xmakeExplorer.rebuild",
  283. "title": "Rebuild",
  284. "category": "XMake",
  285. "enablement": "view == xmakeExplorer"
  286. },
  287. {
  288. "command": "xmakeExplorer.clean",
  289. "title": "Clean",
  290. "category": "XMake",
  291. "enablement": "view == xmakeExplorer"
  292. },
  293. {
  294. "command": "xmakeExplorer.runAll",
  295. "title": "Run All",
  296. "category": "XMake",
  297. "enablement": "view == xmakeExplorer"
  298. },
  299. {
  300. "command": "xmakeExplorer.run",
  301. "title": "Run",
  302. "category": "XMake",
  303. "enablement": "view == xmakeExplorer"
  304. },
  305. {
  306. "command": "xmakeExplorer.debug",
  307. "title": "Debug",
  308. "category": "XMake",
  309. "enablement": "view == xmakeExplorer"
  310. },
  311. {
  312. "command": "xmakeExplorer.configure",
  313. "title": "Configure",
  314. "category": "XMake",
  315. "enablement": "view == xmakeOptions",
  316. "icon": "$(gear)"
  317. }
  318. ],
  319. "menus": {
  320. "commandPalette": [
  321. {
  322. "command": "xmake.onCreateProject"
  323. },
  324. {
  325. "command": "xmake.onNewFiles"
  326. },
  327. {
  328. "command": "xmake.onForceConfigure"
  329. },
  330. {
  331. "command": "xmake.onCleanConfigure"
  332. },
  333. {
  334. "command": "xmake.onBuild"
  335. },
  336. {
  337. "command": "xmake.onBuildAll"
  338. },
  339. {
  340. "command": "xmake.onRebuild"
  341. },
  342. {
  343. "command": "xmake.onClean"
  344. },
  345. {
  346. "command": "xmake.onCleanAll"
  347. },
  348. {
  349. "command": "xmake.onBuildRun"
  350. },
  351. {
  352. "command": "xmake.onRun"
  353. },
  354. {
  355. "command": "xmake.onPackage"
  356. },
  357. {
  358. "command": "xmake.onDebug"
  359. },
  360. {
  361. "command": "xmake.onLaunchDebug"
  362. },
  363. {
  364. "command": "xmake.onInstall"
  365. },
  366. {
  367. "command": "xmake.onUninstall"
  368. },
  369. {
  370. "command": "xmake.onMacroBegin"
  371. },
  372. {
  373. "command": "xmake.onMacroEnd"
  374. },
  375. {
  376. "command": "xmake.onMacroRun"
  377. },
  378. {
  379. "command": "xmake.onRunLastCommand"
  380. },
  381. {
  382. "command": "xmake.onUpdateIntellisense"
  383. },
  384. {
  385. "command": "xmake.setTargetPlat"
  386. },
  387. {
  388. "command": "xmake.setTargetArch"
  389. },
  390. {
  391. "command": "xmake.setBuildMode"
  392. },
  393. {
  394. "command": "xmake.setDefaultTarget"
  395. }
  396. ],
  397. "view/title": [
  398. {
  399. "command": "xmakeExplorer.buildAll",
  400. "when": "view == xmakeExplorer",
  401. "group": "navigation"
  402. },
  403. {
  404. "command": "xmakeExplorer.buildAll",
  405. "when": "view == xmakeExplorer"
  406. },
  407. {
  408. "command": "xmakeExplorer.rebuildAll",
  409. "when": "view == xmakeExplorer"
  410. },
  411. {
  412. "command": "xmakeExplorer.cleanAll",
  413. "when": "view == xmakeExplorer"
  414. },
  415. {
  416. "command": "xmakeExplorer.runAll",
  417. "when": "view == xmakeExplorer"
  418. },
  419. {
  420. "command": "xmakeExplorer.configure",
  421. "when": "view == xmakeOptions",
  422. "group": "navigation"
  423. }
  424. ],
  425. "view/item/context": [
  426. {
  427. "command": "xmakeExplorer.build",
  428. "when": "view == xmakeExplorer && viewItem == target",
  429. "group": "inline"
  430. },
  431. {
  432. "command": "xmakeExplorer.build",
  433. "when": "view == xmakeExplorer && viewItem == target"
  434. },
  435. {
  436. "command": "xmakeExplorer.rebuild",
  437. "when": "view == xmakeExplorer && viewItem == target"
  438. },
  439. {
  440. "command": "xmakeExplorer.clean",
  441. "when": "view == xmakeExplorer && viewItem == target"
  442. },
  443. {
  444. "command": "xmakeExplorer.run",
  445. "when": "view == xmakeExplorer && viewItem == target"
  446. },
  447. {
  448. "command": "xmakeExplorer.debug",
  449. "when": "view == xmakeExplorer && viewItem == target"
  450. }
  451. ]
  452. },
  453. "debuggers": [
  454. {
  455. "type": "xmake",
  456. "languages": [
  457. "c",
  458. "cpp",
  459. "rust"
  460. ],
  461. "configurationAttributes": {
  462. "launch": {
  463. "required": [
  464. "target"
  465. ],
  466. "properties": {
  467. "target": {
  468. "type": "string",
  469. "description": "The xmake target name",
  470. "default": ""
  471. },
  472. "cwd": {
  473. "description": "Program working directory.",
  474. "type": "string",
  475. "default": ""
  476. },
  477. "stopAtEntry": {
  478. "description": "If set to true, the debugger should stop at the entry-point of the target.",
  479. "type": "boolean",
  480. "default": false
  481. },
  482. "args": {
  483. "description": "Program arguments.",
  484. "type": [
  485. "array",
  486. "string"
  487. ],
  488. "default": []
  489. },
  490. "terminal": {
  491. "type": "string",
  492. "enum": [
  493. "integrated",
  494. "external",
  495. "console",
  496. "newExternal"
  497. ],
  498. "enumDescriptions": [
  499. "Use integrated terminal in VSCode.",
  500. "Use external terminal window.",
  501. "Use VScode Debug Console for stdout and stderr. Stdin will be unavailable.",
  502. "Use external terminal window for console application, nothing for the others (only with cpptools). "
  503. ],
  504. "default": "integrated"
  505. },
  506. "env": {
  507. "description": "Additional environment variables.",
  508. "type": "object",
  509. "patternProperties": {
  510. ".*": {
  511. "type": "string"
  512. }
  513. },
  514. "default": {}
  515. }
  516. }
  517. },
  518. "attach": {
  519. "required": [
  520. "target"
  521. ],
  522. "properties": {
  523. "target": {
  524. "type": "string",
  525. "description": "The xmake target name",
  526. "default": ""
  527. },
  528. "cwd": {
  529. "description": "Program working directory.",
  530. "type": "string",
  531. "default": ""
  532. },
  533. "stopAtEntry": {
  534. "description": "If set to true, the debugger should stop at the entry-point of the target.",
  535. "type": "boolean",
  536. "default": false
  537. },
  538. "args": {
  539. "description": "Program arguments.",
  540. "type": [
  541. "array",
  542. "string"
  543. ],
  544. "default": []
  545. },
  546. "terminal": {
  547. "type": "string",
  548. "enum": [
  549. "integrated",
  550. "external",
  551. "console",
  552. "newExternal"
  553. ],
  554. "enumDescriptions": [
  555. "Use integrated terminal in VSCode.",
  556. "Use external terminal window.",
  557. "Use VScode Debug Console for stdout and stderr. Stdin will be unavailable.",
  558. "Use external terminal window for console application, nothing for the others (only with cpptools). "
  559. ],
  560. "default": "integrated"
  561. },
  562. "env": {
  563. "description": "Additional environment variables.",
  564. "type": "object",
  565. "patternProperties": {
  566. ".*": {
  567. "type": "string"
  568. }
  569. },
  570. "default": {}
  571. }
  572. }
  573. }
  574. },
  575. "initialConfigurations": [
  576. {
  577. "type": "xmake",
  578. "request": "launch",
  579. "name": "Debug XMake target",
  580. "target": "target name",
  581. "cwd": "${workspaceFolder}",
  582. "stopAtEntry": true
  583. }
  584. ],
  585. "configurationSnippets": [
  586. {
  587. "label": "XMake Debug: Launch",
  588. "description": "A new configuration xmake debugger.",
  589. "body": {
  590. "type": "xmake",
  591. "request": "launch",
  592. "name": "${2:Launch}",
  593. "target": "${1:Target}",
  594. "cwd": "${workspaceFolder}",
  595. "stopAtEntry": true
  596. }
  597. }
  598. ]
  599. }
  600. ],
  601. "configuration": {
  602. "type": "object",
  603. "title": "XMake configuration",
  604. "properties": {
  605. "xmake.executable": {
  606. "type": "string",
  607. "default": "xmake",
  608. "description": "The xmake executable name / path"
  609. },
  610. "xmake.logLevel": {
  611. "type": "string",
  612. "default": "normal",
  613. "description": "The Log Level: normal/verbose/minimal",
  614. "enum": [
  615. "verbose",
  616. "normal",
  617. "minimal"
  618. ]
  619. },
  620. "xmake.buildLevel": {
  621. "type": "string",
  622. "default": "normal",
  623. "description": "The Build Output Level: normal/verbose/debug",
  624. "enum": [
  625. "verbose",
  626. "normal",
  627. "debug"
  628. ]
  629. },
  630. "xmake.runMode": {
  631. "type": "string",
  632. "default": "runOnly",
  633. "description": "The Run Mode: runOnly/buildRun",
  634. "enum": [
  635. "runOnly",
  636. "buildRun"
  637. ]
  638. },
  639. "xmake.buildDirectory": {
  640. "type": "string",
  641. "default": "${workspaceRoot}/build",
  642. "description": "The Build Output Directory"
  643. },
  644. "xmake.installDirectory": {
  645. "type": "string",
  646. "default": "",
  647. "description": "The Install Output Directory"
  648. },
  649. "xmake.packageDirectory": {
  650. "type": "string",
  651. "default": "",
  652. "description": "The Package Output Directory"
  653. },
  654. "xmake.workingDirectory": {
  655. "type": "string",
  656. "default": "${workspaceRoot}",
  657. "description": "The Project Working Directory with the root xmake.lua"
  658. },
  659. "xmake.androidNDKDirectory": {
  660. "type": "string",
  661. "default": "",
  662. "description": "The Android NDK Directory"
  663. },
  664. "xmake.QtDirectory": {
  665. "type": "string",
  666. "default": "",
  667. "description": "The Qt Directory"
  668. },
  669. "xmake.WDKDirectory": {
  670. "type": "string",
  671. "default": "",
  672. "description": "The WDK Directory"
  673. },
  674. "xmake.compileCommandsDirectory": {
  675. "type": "string",
  676. "default": ".vscode",
  677. "description": "The compile_commands.json file directory"
  678. },
  679. "xmake.compileCommandsBackend": {
  680. "type": "string",
  681. "default": "clangd",
  682. "description": "Set the LSP backend for compile_commands"
  683. },
  684. "xmake.additionalConfigArguments": {
  685. "type": "array",
  686. "items": {
  687. "type": "string"
  688. },
  689. "default": [],
  690. "description": "The Additional Config Arguments, .e.g [\"--cc=gcc\", \"--myopt=xxx\"]"
  691. },
  692. "xmake.runningTargetsArguments": {
  693. "type": "object",
  694. "default": {
  695. "default": []
  696. },
  697. "description": "The Running Targets Arguments, .e.g {\"targetName\": [\"args\", \"...\"]}"
  698. },
  699. "xmake.debuggingTargetsArguments": {
  700. "type": "object",
  701. "default": {
  702. "default": []
  703. },
  704. "description": "The Debugging Targets Arguments, .e.g {\"targetName\": [\"args\", \"...\"]}"
  705. },
  706. "xmake.debugConfigType": {
  707. "type": "string",
  708. "default": "default",
  709. "enum": [
  710. "default",
  711. "codelldb"
  712. ],
  713. "description": "The Debugging Configuration Type, .e.g default|codelldb"
  714. },
  715. "xmake.customDebugConfig": {
  716. "type": "object",
  717. "default": {},
  718. "description": "The Custom Debugging Configurations"
  719. },
  720. "xmake.envBehaviour": {
  721. "type": "string",
  722. "default": "merge",
  723. "enum": [
  724. "erase",
  725. "merge",
  726. "override"
  727. ],
  728. "description": "Environment behaviour between launch.json and xmake envs",
  729. "enumDescriptions": [
  730. "XMake envs will erase launch.json envs",
  731. "This will concat launch.json envs and xmake envs",
  732. "Launch configurations will override xmake envs"
  733. ]
  734. },
  735. "xmake.enableSyntaxCheck": {
  736. "type": "boolean",
  737. "default": true,
  738. "description": "Enable lua syntax check"
  739. }
  740. }
  741. },
  742. "viewsContainers": {
  743. "activitybar": [
  744. {
  745. "id": "xmake-explorer",
  746. "title": "XMake",
  747. "icon": "res/logo-mono.svg"
  748. }
  749. ]
  750. },
  751. "views": {
  752. "xmake-explorer": [
  753. {
  754. "type": "tree",
  755. "id": "xmakeExplorer",
  756. "name": "Targets",
  757. "icon": "res/logo-mono.svg",
  758. "contextualTitle": "XMake",
  759. "when": "xmakeEnabled"
  760. }
  761. ]
  762. }
  763. },
  764. "scripts": {
  765. "vscode:prepublish": "npm run compile",
  766. "compile": "npx tsc -p ./",
  767. "watch": "npx tsc -watch -p ./",
  768. "test": "npm run compile"
  769. },
  770. "dependencies": {
  771. "encoding": "^0.1.13"
  772. },
  773. "devDependencies": {
  774. "@types/node": "^16.10.4",
  775. "@types/vscode": "^1.58.0",
  776. "typescript": "^4.4.3",
  777. "vsce": "^2.11.0"
  778. }
  779. }