-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwatcher.lua
More file actions
32 lines (32 loc) · 884 Bytes
/
Copy pathwatcher.lua
File metadata and controls
32 lines (32 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
return {
{
-- 'path' is relative to the watched tree, so this anchors at the top level.
should_run = function(path)
if path:starts_with("target/") then
return false
end
return path:ext() == "rs" or path:ext() == "toml"
end,
redirect_stdout = "/tmp/cargo.out",
redirect_stderr = "/tmp/cargo.err",
start_delay = 50,
commands = {
{
name = "Cargo check",
command = "cargo check --color always",
},
{
name = "Cargo test",
command = "cargo test --color always",
},
{
name = "Cargo build (release)",
command = "cargo build --release --color always",
},
{
name = "Cargo clippy",
command = "cargo clippy --color always",
},
},
},
}