Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion helix-loader/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,14 @@ pub fn log_file() -> PathBuf {
}

pub fn workspace_config_file() -> PathBuf {
find_workspace().0.join(".helix").join("config.toml")
let root = find_workspace().0;
let dot_config_path = root.join(".config").join("helix").join("config.toml");

if dot_config_path.exists() {
dot_config_path
} else {
root.join(".helix").join("config.toml")
}
}

pub fn lang_config_file() -> PathBuf {
Expand Down Expand Up @@ -254,6 +261,7 @@ pub fn find_workspace_in(dir: impl AsRef<Path>) -> (PathBuf, bool) {
|| ancestor.join(".svn").exists()
|| ancestor.join(".jj").exists()
|| ancestor.join(".helix").exists()
|| ancestor.join(".config").join("helix").exists()
{
return (ancestor.to_owned(), false);
}
Expand Down
1 change: 1 addition & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2569,6 +2569,7 @@ fn global_search(cx: &mut Context) {
})
.add_custom_ignore_filename(helix_loader::config_dir().join("ignore"))
.add_custom_ignore_filename(".helix/ignore")
.add_custom_ignore_filename(".config/helix/ignore")
.build_parallel()
.run(|| {
let mut searcher = searcher.clone();
Expand Down
3 changes: 2 additions & 1 deletion helix-term/src/commands/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ pub fn syntax_workspace_symbol_picker(cx: &mut Context) {
.max_depth(config.file_picker.max_depth)
.filter_entry(move |entry| filter_picker_entry(entry, &absolute_root, dedup_symlinks))
.add_custom_ignore_filename(helix_loader::config_dir().join("ignore"))
.add_custom_ignore_filename(".helix/ignore");
.add_custom_ignore_filename(".helix/ignore")
.add_custom_ignore_filename(".config/helix/ignore");

let mut regex_matcher_builder = RegexMatcherBuilder::new();
regex_matcher_builder.case_smart(config.search.smart_case);
Expand Down
2 changes: 2 additions & 0 deletions helix-term/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ pub fn file_picker(editor: &Editor, root: PathBuf) -> FilePicker {
.filter_entry(move |entry| filter_picker_entry(entry, &absolute_root, dedup_symlinks))
.add_custom_ignore_filename(helix_loader::config_dir().join("ignore"))
.add_custom_ignore_filename(".helix/ignore")
.add_custom_ignore_filename(".config/helix/ignore")
.types(get_excluded_types())
.build()
.filter_map(|entry| {
Expand Down Expand Up @@ -372,6 +373,7 @@ fn directory_content(root: &Path, editor: &Editor) -> Result<Vec<(PathBuf, bool)
.max_depth(Some(1))
.add_custom_ignore_filename(helix_loader::config_dir().join("ignore"))
.add_custom_ignore_filename(".helix/ignore")
.add_custom_ignore_filename(".config/helix/ignore")
.types(get_excluded_types())
.build()
.filter_map(|entry| {
Expand Down
3 changes: 2 additions & 1 deletion helix-view/src/expansion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ pub enum Variable {
LineEnding,
/// Curreng working directory
CurrentWorkingDirectory,
/// Nearest ancestor directory of the current working directory that contains `.git`, `.svn`, `jj` or `.helix`
/// Nearest ancestor directory of the current working directory that contains `.git`, `.svn`,
/// `jj`, `.helix`, or `.config/helix`
WorkspaceDirectory,
// The name of current buffers language as set in `languages.toml`
Language,
Expand Down