summaryrefslogtreecommitdiff
path: root/helix-core/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-06-03 03:58:31 +0000
committerGitHub2021-06-03 03:58:31 +0000
commit5773bd6a4028ba0b8c98574d600c18dd7094a99d (patch)
treee087f10530c230120378079c73062c23f1da5bcc /helix-core/src
parent7e8603247d5b7ba90bb095afd36fd2058cc53ec6 (diff)
parentd664d1dec066eb1bd237af61c22b62d93b48646b (diff)
Merge pull request #64 from pickfire/log
Default log file to cache
Diffstat (limited to 'helix-core/src')
-rw-r--r--helix-core/src/lib.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs
index d5b0cd15..3e00081f 100644
--- a/helix-core/src/lib.rs
+++ b/helix-core/src/lib.rs
@@ -58,13 +58,22 @@ pub fn runtime_dir() -> std::path::PathBuf {
pub fn config_dir() -> std::path::PathBuf {
// TODO: allow env var override
- use etcetera::base_strategy::{choose_base_strategy, BaseStrategy};
let strategy = choose_base_strategy().expect("Unable to find the config directory!");
let mut path = strategy.config_dir();
path.push("helix");
path
}
+pub fn cache_dir() -> std::path::PathBuf {
+ // TODO: allow env var override
+ let strategy = choose_base_strategy().expect("Unable to find the config directory!");
+ let mut path = strategy.cache_dir();
+ path.push("helix");
+ path
+}
+
+use etcetera::base_strategy::{choose_base_strategy, BaseStrategy};
+
pub use ropey::{Rope, RopeSlice};
pub use tendril::StrTendril as Tendril;