Debian Codegraph @

CodeFormatter/fmtRustfmt.cpp

raw
1 #include "fmtRustfmt.hpp"
2
3 #include "Platform.hpp"
4
5 fmtRustfmt::fmtRustfmt()
6 {
7 SetName("rustfmt");
8 SetFileTypes({ FileExtManager::TypeRust });
9 SetDescription(_("Format Rust code"));
10 SetShortDescription(_("Rust formatter"));
11 SetInplaceFormatter(true);
12 SetConfigFilepath("$(WorkspacePath)/.rustfmt.toml");
13
14 // local command
15 wxString rustfmt_exe = "rustfmt";
16 ThePlatform->Which("rustfmt", &rustfmt_exe);
17 SetCommand({ rustfmt_exe, "--edition", "2021", R"#("$(CurrentFileRelPath)")#" });
18 }
19
20 fmtRustfmt::~fmtRustfmt() {}