package.json 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786
  1. {
  2. "name": "xmake-vscode",
  3. "displayName": "XMake",
  4. "description": "Extended XMake support in Visual Studio Code",
  5. "version": "2.4.1",
  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. },
  280. {
  281. "command": "xmakeExplorer.rebuild",
  282. "title": "Rebuild",
  283. "category": "XMake",
  284. "enablement": "view == xmakeExplorer"
  285. },
  286. {
  287. "command": "xmakeExplorer.clean",
  288. "title": "Clean",
  289. "category": "XMake",
  290. "enablement": "view == xmakeExplorer"
  291. },
  292. {
  293. "command": "xmakeExplorer.runAll",
  294. "title": "Run All",
  295. "category": "XMake",
  296. "enablement": "view == xmakeExplorer"
  297. },
  298. {
  299. "command": "xmakeExplorer.run",
  300. "title": "Run",
  301. "category": "XMake",
  302. "enablement": "view == xmakeExplorer"
  303. },
  304. {
  305. "command": "xmakeExplorer.debug",
  306. "title": "Debug",
  307. "category": "XMake",
  308. "enablement": "view == xmakeExplorer"
  309. },
  310. {
  311. "command": "xmakeExplorer.configure",
  312. "title": "Configure",
  313. "category": "XMake",
  314. "enablement": "view == xmakeOptions",
  315. "icon": "$(gear)"
  316. }
  317. ],
  318. "menus": {
  319. "commandPalette": [
  320. {
  321. "command": "xmake.onCreateProject"
  322. },
  323. {
  324. "command": "xmake.onNewFiles"
  325. },
  326. {
  327. "command": "xmake.onForceConfigure"
  328. },
  329. {
  330. "command": "xmake.onCleanConfigure"
  331. },
  332. {
  333. "command": "xmake.onBuild"
  334. },
  335. {
  336. "command": "xmake.onBuildAll"
  337. },
  338. {
  339. "command": "xmake.onRebuild"
  340. },
  341. {
  342. "command": "xmake.onClean"
  343. },
  344. {
  345. "command": "xmake.onCleanAll"
  346. },
  347. {
  348. "command": "xmake.onBuildRun"
  349. },
  350. {
  351. "command": "xmake.onRun"
  352. },
  353. {
  354. "command": "xmake.onPackage"
  355. },
  356. {
  357. "command": "xmake.onDebug"
  358. },
  359. {
  360. "command": "xmake.onLaunchDebug"
  361. },
  362. {
  363. "command": "xmake.onInstall"
  364. },
  365. {
  366. "command": "xmake.onUninstall"
  367. },
  368. {
  369. "command": "xmake.onMacroBegin"
  370. },
  371. {
  372. "command": "xmake.onMacroEnd"
  373. },
  374. {
  375. "command": "xmake.onMacroRun"
  376. },
  377. {
  378. "command": "xmake.onRunLastCommand"
  379. },
  380. {
  381. "command": "xmake.onUpdateIntellisense"
  382. },
  383. {
  384. "command": "xmake.setTargetPlat"
  385. },
  386. {
  387. "command": "xmake.setTargetArch"
  388. },
  389. {
  390. "command": "xmake.setBuildMode"
  391. },
  392. {
  393. "command": "xmake.setDefaultTarget"
  394. }
  395. ],
  396. "view/title": [
  397. {
  398. "command": "xmakeExplorer.buildAll",
  399. "when": "view == xmakeExplorer",
  400. "group": "navigation"
  401. },
  402. {
  403. "command": "xmakeExplorer.buildAll",
  404. "when": "view == xmakeExplorer"
  405. },
  406. {
  407. "command": "xmakeExplorer.rebuildAll",
  408. "when": "view == xmakeExplorer"
  409. },
  410. {
  411. "command": "xmakeExplorer.cleanAll",
  412. "when": "view == xmakeExplorer"
  413. },
  414. {
  415. "command": "xmakeExplorer.runAll",
  416. "when": "view == xmakeExplorer"
  417. },
  418. {
  419. "command": "xmakeExplorer.configure",
  420. "when": "view == xmakeOptions",
  421. "group": "navigation"
  422. }
  423. ],
  424. "view/item/context": [
  425. {
  426. "command": "xmakeExplorer.build",
  427. "when": "view == xmakeExplorer && viewItem == target",
  428. "group": "inline"
  429. },
  430. {
  431. "command": "xmakeExplorer.build",
  432. "when": "view == xmakeExplorer && viewItem == target"
  433. },
  434. {
  435. "command": "xmakeExplorer.rebuild",
  436. "when": "view == xmakeExplorer && viewItem == target"
  437. },
  438. {
  439. "command": "xmakeExplorer.clean",
  440. "when": "view == xmakeExplorer && viewItem == target"
  441. },
  442. {
  443. "command": "xmakeExplorer.run",
  444. "when": "view == xmakeExplorer && viewItem == target"
  445. },
  446. {
  447. "command": "xmakeExplorer.debug",
  448. "when": "view == xmakeExplorer && viewItem == target"
  449. }
  450. ]
  451. },
  452. "debuggers": [
  453. {
  454. "type": "xmake",
  455. "languages": [
  456. "c",
  457. "cpp",
  458. "rust"
  459. ],
  460. "configurationAttributes": {
  461. "launch": {
  462. "required": [
  463. "target"
  464. ],
  465. "properties": {
  466. "target": {
  467. "type": "string",
  468. "description": "The xmake target name",
  469. "default": ""
  470. },
  471. "cwd": {
  472. "description": "Program working directory.",
  473. "type": "string",
  474. "default": ""
  475. },
  476. "stopAtEntry": {
  477. "description": "If set to true, the debugger should stop at the entry-point of the target.",
  478. "type": "boolean",
  479. "default": false
  480. },
  481. "args": {
  482. "description": "Program arguments.",
  483. "type": [
  484. "array",
  485. "string"
  486. ],
  487. "default": []
  488. },
  489. "terminal": {
  490. "type": "string",
  491. "enum": [
  492. "integrated",
  493. "external",
  494. "console",
  495. "newExternal"
  496. ],
  497. "enumDescriptions": [
  498. "Use integrated terminal in VSCode.",
  499. "Use external terminal window.",
  500. "Use VScode Debug Console for stdout and stderr. Stdin will be unavailable.",
  501. "Use external terminal window for console application, nothing for the others (only with cpptools). "
  502. ],
  503. "default": "integrated"
  504. },
  505. "env": {
  506. "description": "Additional environment variables.",
  507. "type": "object",
  508. "patternProperties": {
  509. ".*": {
  510. "type": "string"
  511. }
  512. },
  513. "default": {}
  514. }
  515. }
  516. },
  517. "attach": {
  518. "required": [
  519. "target"
  520. ],
  521. "properties": {
  522. "target": {
  523. "type": "string",
  524. "description": "The xmake target name",
  525. "default": ""
  526. },
  527. "cwd": {
  528. "description": "Program working directory.",
  529. "type": "string",
  530. "default": ""
  531. },
  532. "stopAtEntry": {
  533. "description": "If set to true, the debugger should stop at the entry-point of the target.",
  534. "type": "boolean",
  535. "default": false
  536. },
  537. "args": {
  538. "description": "Program arguments.",
  539. "type": [
  540. "array",
  541. "string"
  542. ],
  543. "default": []
  544. },
  545. "terminal": {
  546. "type": "string",
  547. "enum": [
  548. "integrated",
  549. "external",
  550. "console",
  551. "newExternal"
  552. ],
  553. "enumDescriptions": [
  554. "Use integrated terminal in VSCode.",
  555. "Use external terminal window.",
  556. "Use VScode Debug Console for stdout and stderr. Stdin will be unavailable.",
  557. "Use external terminal window for console application, nothing for the others (only with cpptools). "
  558. ],
  559. "default": "integrated"
  560. },
  561. "env": {
  562. "description": "Additional environment variables.",
  563. "type": "object",
  564. "patternProperties": {
  565. ".*": {
  566. "type": "string"
  567. }
  568. },
  569. "default": {}
  570. }
  571. }
  572. }
  573. },
  574. "initialConfigurations": [
  575. {
  576. "type": "xmake",
  577. "request": "launch",
  578. "name": "Debug XMake target",
  579. "target": "target name",
  580. "cwd": "${workspaceFolder}",
  581. "stopAtEntry": true
  582. }
  583. ],
  584. "configurationSnippets": [
  585. {
  586. "label": "XMake Debug: Launch",
  587. "description": "A new configuration xmake debugger.",
  588. "body": {
  589. "type": "xmake",
  590. "request": "launch",
  591. "name": "${2:Launch}",
  592. "target": "${1:Target}",
  593. "cwd": "${workspaceFolder}",
  594. "stopAtEntry": true
  595. }
  596. }
  597. ]
  598. }
  599. ],
  600. "configuration": {
  601. "type": "object",
  602. "title": "XMake configuration",
  603. "properties": {
  604. "xmake.executable": {
  605. "type": "string",
  606. "default": "xmake",
  607. "description": "The xmake executable name / path"
  608. },
  609. "xmake.logLevel": {
  610. "type": "string",
  611. "default": "normal",
  612. "description": "The Log Level: normal/verbose/minimal",
  613. "enum": [
  614. "verbose",
  615. "normal",
  616. "minimal"
  617. ]
  618. },
  619. "xmake.buildLevel": {
  620. "type": "string",
  621. "default": "normal",
  622. "description": "The Build Output Level: normal/verbose/debug",
  623. "enum": [
  624. "verbose",
  625. "normal",
  626. "debug"
  627. ]
  628. },
  629. "xmake.runMode": {
  630. "type": "string",
  631. "default": "runOnly",
  632. "description": "The Run Mode: runOnly/buildRun",
  633. "enum": [
  634. "runOnly",
  635. "buildRun"
  636. ]
  637. },
  638. "xmake.buildDirectory": {
  639. "type": "string",
  640. "default": "${workspaceRoot}/build",
  641. "description": "The Build Output Directory"
  642. },
  643. "xmake.installDirectory": {
  644. "type": "string",
  645. "default": "",
  646. "description": "The Install Output Directory"
  647. },
  648. "xmake.packageDirectory": {
  649. "type": "string",
  650. "default": "",
  651. "description": "The Package Output Directory"
  652. },
  653. "xmake.workingDirectory": {
  654. "type": "string",
  655. "default": "${workspaceRoot}",
  656. "description": "The Project Working Directory with the root xmake.lua"
  657. },
  658. "xmake.androidNDKDirectory": {
  659. "type": "string",
  660. "default": "",
  661. "description": "The Android NDK Directory"
  662. },
  663. "xmake.QtDirectory": {
  664. "type": "string",
  665. "default": "",
  666. "description": "The Qt Directory"
  667. },
  668. "xmake.WDKDirectory": {
  669. "type": "string",
  670. "default": "",
  671. "description": "The WDK Directory"
  672. },
  673. "xmake.compileCommandsDirectory": {
  674. "type": "string",
  675. "default": ".vscode",
  676. "description": "The compile_commands.json file directory"
  677. },
  678. "xmake.compileCommandsBackend": {
  679. "type": "string",
  680. "default": "clangd",
  681. "description": "Set the LSP backend for compile_commands"
  682. },
  683. "xmake.additionalConfigArguments": {
  684. "type": "array",
  685. "items": {
  686. "type": "string"
  687. },
  688. "default": [],
  689. "description": "The Additional Config Arguments, .e.g [\"--cc=gcc\", \"--myopt=xxx\"]"
  690. },
  691. "xmake.runningTargetsArguments": {
  692. "type": "object",
  693. "default": {
  694. "default": []
  695. },
  696. "description": "The Running Targets Arguments, .e.g {\"targetName\": [\"args\", \"...\"]}"
  697. },
  698. "xmake.debuggingTargetsArguments": {
  699. "type": "object",
  700. "default": {
  701. "default": []
  702. },
  703. "description": "The Debugging Targets Arguments, .e.g {\"targetName\": [\"args\", \"...\"]}"
  704. },
  705. "xmake.debugConfigType": {
  706. "type": "string",
  707. "default": "default",
  708. "enum": [
  709. "default",
  710. "codelldb"
  711. ],
  712. "description": "The Debugging Configuration Type, .e.g default|codelldb"
  713. },
  714. "xmake.customDebugConfig": {
  715. "type": "object",
  716. "default": {},
  717. "description": "The Custom Debugging Configurations"
  718. },
  719. "xmake.envBehaviour": {
  720. "type": "string",
  721. "default": "merge",
  722. "enum": [
  723. "erase",
  724. "merge",
  725. "override"
  726. ],
  727. "description": "Environment behaviour between launch.json and xmake envs",
  728. "enumDescriptions": [
  729. "XMake envs will erase launch.json envs",
  730. "This will concat launch.json envs and xmake envs",
  731. "Launch configurations will override xmake envs"
  732. ]
  733. },
  734. "xmake.enableSyntaxCheck": {
  735. "type": "boolean",
  736. "default": true,
  737. "description": "Enable lua syntax check"
  738. }
  739. }
  740. },
  741. "viewsContainers": {
  742. "activitybar": [
  743. {
  744. "id": "xmake-explorer",
  745. "title": "XMake",
  746. "icon": "res/logo-mono.svg"
  747. }
  748. ]
  749. },
  750. "views": {
  751. "xmake-explorer": [
  752. {
  753. "type": "tree",
  754. "id": "xmakeConfigureView",
  755. "name": "Configure",
  756. "icon": "res/logo-mono.svg",
  757. "contextualTitle": "XMake Configure",
  758. "when": "xmakeEnabled"
  759. },
  760. {
  761. "type": "tree",
  762. "id": "xmakeExplorer",
  763. "name": "Targets",
  764. "icon": "res/logo-mono.svg",
  765. "contextualTitle": "XMake",
  766. "when": "xmakeEnabled"
  767. }
  768. ]
  769. }
  770. },
  771. "scripts": {
  772. "vscode:prepublish": "npm run compile",
  773. "compile": "npx tsc -p ./",
  774. "watch": "npx tsc -watch -p ./",
  775. "test": "npm run compile"
  776. },
  777. "dependencies": {
  778. "encoding": "^0.1.13"
  779. },
  780. "devDependencies": {
  781. "@types/node": "^16.10.4",
  782. "@types/vscode": "^1.58.0",
  783. "typescript": "^4.4.3",
  784. "vsce": "^2.11.0"
  785. }
  786. }