diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -26,6 +26,7 @@ Tasks in this plugin are provided by modules that implement functionality for a | |||
26 | 26 | ||
27 | - [CMake](https://cmake.org) via [cmake-file-api](https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html#codemodel-version-2). | 27 | - [CMake](https://cmake.org) via [cmake-file-api](https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html#codemodel-version-2). |
28 | - [Cargo](https://doc.rust-lang.org/cargo). | 28 | - [Cargo](https://doc.rust-lang.org/cargo). |
29 | - [GNU Make](https://www.gnu.org/software/make/) | ||
29 | 30 | ||
30 | You can also write [your own module](#modules-creation-and-configuration). | 31 | You can also write [your own module](#modules-creation-and-configuration). |
31 | 32 | ||
@@ -90,6 +91,31 @@ require('tasks').setup({ | |||
90 | 91 | ||
91 | Cargo module doesn't have a `target` param which specific to CMake because `cargo run` automatically pick the binary. If there is multiple binaries, you can set which one you want to run using `--bin` or `--project` in step 2 as you do in CLI. | 92 | Cargo module doesn't have a `target` param which specific to CMake because `cargo run` automatically pick the binary. If there is multiple binaries, you can set which one you want to run using `--bin` or `--project` in step 2 as you do in CLI. |
92 | 93 | ||
94 | ### GNU Make | ||
95 | |||
96 | 1. Open a Make project. | ||
97 | 2. Run a Make target `<target>` with `:Task start make <target>`. | ||
98 | |||
99 | To override targets or add custom `make` options, configure the appropriate task: | ||
100 | |||
101 | ```lua | ||
102 | require('tasks').setup({ | ||
103 | default_params = { | ||
104 | ... | ||
105 | make = { | ||
106 | cmd = 'make', | ||
107 | args = { | ||
108 | all = { '-j10', 'all' }, -- :Task start make all → make -j10 all | ||
109 | build = {}, -- :Task start make build → make | ||
110 | nuke = { 'clean' }, -- :Task start make nuke → make clean | ||
111 | }, | ||
112 | }, | ||
113 | ... | ||
114 | } | ||
115 | }) | ||
116 | ``` | ||
117 | |||
118 | |||
93 | ## Modules creation and configuration | 119 | ## Modules creation and configuration |
94 | 120 | ||
95 | To create a module just put a lua file under `lua/tasks/modules` in your configuration or submit your module as a PR. In this module you need to return a table with the following fields: | 121 | To create a module just put a lua file under `lua/tasks/modules` in your configuration or submit your module as a PR. In this module you need to return a table with the following fields: |