forked from helix-editor/helix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* RUNTIME_DIR now behaves similar to the other runtime files * lib.rs cleanup * merge_toml_values: Moved function explanation comment in a function call to its documentation. * slight appalication.rs cleanup * Reduce use of relative filepaths with a helix_loader::repo_paths.rs
- Loading branch information
Showing
16 changed files
with
96 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use std::path::{Path, PathBuf}; | ||
|
||
pub fn project_root() -> PathBuf { | ||
Path::new(env!("CARGO_MANIFEST_DIR")) | ||
.parent().unwrap().to_path_buf() | ||
} | ||
|
||
pub fn book_gen() -> PathBuf { | ||
project_root().join("book/src/generated/") | ||
} | ||
|
||
pub fn ts_queries() -> PathBuf { | ||
project_root().join("runtime/queries") | ||
} | ||
|
||
pub fn themes() -> PathBuf { | ||
project_root().join("runtime/themes") | ||
} | ||
|
||
pub fn default_config_dir() -> PathBuf { | ||
// TODO: would be nice to move config files away from project root folder | ||
project_root() | ||
} | ||
|
||
pub fn default_lang_configs() -> PathBuf { | ||
default_config_dir().join("languages.toml") | ||
} | ||
|
||
pub fn default_theme() -> PathBuf { | ||
default_config_dir().join("theme.toml") | ||
} | ||
|
||
pub fn default_base16_theme() -> PathBuf { | ||
default_config_dir().join("base16_theme.toml") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.