summaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/lib.rs12
-rw-r--r--helix-core/src/syntax.rs2
2 files changed, 13 insertions, 1 deletions
diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs
index 8e5950de..c3a349c1 100644
--- a/helix-core/src/lib.rs
+++ b/helix-core/src/lib.rs
@@ -124,6 +124,18 @@ pub fn cache_dir() -> std::path::PathBuf {
path
}
+pub fn config_file() -> std::path::PathBuf {
+ config_dir().join("config.toml")
+}
+
+pub fn lang_config_file() -> std::path::PathBuf {
+ config_dir().join("languages.toml")
+}
+
+pub fn log_file() -> std::path::PathBuf {
+ cache_dir().join("helix.log")
+}
+
// right overrides left
pub fn merge_toml_values(left: toml::Value, right: toml::Value) -> toml::Value {
use toml::Value;
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index f2939e3d..c39e0584 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -335,7 +335,7 @@ impl TextObjectQuery {
}
}
-fn load_runtime_file(language: &str, filename: &str) -> Result<String, std::io::Error> {
+pub fn load_runtime_file(language: &str, filename: &str) -> Result<String, std::io::Error> {
let path = crate::RUNTIME_DIR
.join("queries")
.join(language)