|
|
|
@ -189,6 +189,14 @@ void Config::read(const JSON &cfg) { |
|
|
|
project.cargo_command = project_json.string("cargo_command"); |
|
|
|
project.cargo_command = project_json.string("cargo_command"); |
|
|
|
project.python_command = project_json.string("python_command"); |
|
|
|
project.python_command = project_json.string("python_command"); |
|
|
|
project.markdown_command = project_json.string("markdown_command"); |
|
|
|
project.markdown_command = project_json.string("markdown_command"); |
|
|
|
|
|
|
|
std::stringstream ss(project_json.string("open_with_default_application")); |
|
|
|
|
|
|
|
std::string str; |
|
|
|
|
|
|
|
project.open_with_default_application.clear(); |
|
|
|
|
|
|
|
while(getline(ss, str, ',')) { |
|
|
|
|
|
|
|
while(!str.empty() && str.front() == ' ') |
|
|
|
|
|
|
|
str.erase(str.begin()); |
|
|
|
|
|
|
|
project.open_with_default_application.emplace_back(std::move(str)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
auto terminal_json = cfg.object("terminal"); |
|
|
|
auto terminal_json = cfg.object("terminal"); |
|
|
|
terminal.history_size = terminal_json.integer("history_size", JSON::ParseOptions::accept_string); |
|
|
|
terminal.history_size = terminal_json.integer("history_size", JSON::ParseOptions::accept_string); |
|
|
|
@ -347,7 +355,9 @@ std::string Config::default_config() { |
|
|
|
"grep_command": "grep", |
|
|
|
"grep_command": "grep", |
|
|
|
"cargo_command": "cargo", |
|
|
|
"cargo_command": "cargo", |
|
|
|
"python_command": "python -u", |
|
|
|
"python_command": "python -u", |
|
|
|
"markdown_command": "grip -b" |
|
|
|
"markdown_command": "grip -b", |
|
|
|
|
|
|
|
"open_with_default_application_comment": "Comma-separated list of file extensions that should be opened with system default applications", |
|
|
|
|
|
|
|
"open_with_default_application": ".pdf,.png" |
|
|
|
}, |
|
|
|
}, |
|
|
|
"keybindings": { |
|
|
|
"keybindings": { |
|
|
|
"preferences": "<primary>comma", |
|
|
|
"preferences": "<primary>comma", |
|
|
|
|