Skip to content
Merged
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
12 changes: 5 additions & 7 deletions src/commands/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@ pub fn run_watch(
filter: Option<&str>,
verbose: bool,
) -> Result<()> {
let db_path = project_root.join(".cora/index.db");
if let Some(parent) = db_path.parent() {
std::fs::create_dir_all(parent).ok();
}
let conn = rusqlite::Connection::open(&db_path)
.with_context(|| format!("Failed to open index database at {}", db_path.display()))?;
let conn = crate::index::open_global_index()?;
// Load skip patterns from config
let skip_patterns: Option<Vec<String>> =
crate::config::loader::load_config(config_path, None, None, None, None, false)
Expand Down Expand Up @@ -131,7 +126,10 @@ fn detect_changes(
glob_matcher: Option<&glob::Pattern>,
) -> Result<Vec<PathBuf>> {
let mut changed = Vec::new();
let extensions: &[&str] = &["rs", "py", "js", "ts", "go", "java", "c", "cpp", "h", "rb"];
let extensions: &[&str] = &[
"rs", "py", "js", "ts", "go", "java", "c", "cpp", "h", "rb", "php", "scala", "cs", "kt",
"svelte", "jsx", "tsx",
];

let mut walker = |path: &Path| {
// Skip files inside hidden directories (relative to project root)
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,7 @@ async fn main() -> Result<()> {
filter,
} => {
let project_root = std::env::current_dir()?;
let project_root = index::resolve_project_root(&project_root).unwrap_or(project_root);
let config_path = cli.global.config.as_deref();
commands::watch::run_watch(
&project_root,
Expand Down
Loading