Get the .atomicignore content for a given project kind. This function returns appropriate ignore patterns for common project types, helping users start with sensible defaults. # Arguments `kind` - The project kind (e.g., "rust", "python", "node") # Returns The content for the .atomicignore file, or `None` if the kind is unknown. # Supported Kinds - `rust`: Ignores `target/`, `Cargo.lock` (f
(kind: &str)
| 92 | /// - `java`: Ignores `target/`, `*.class`, `*.jar` |
| 93 | /// - `c` / `cpp`: Ignores `*.o`, `*.a`, `*.so`, `build/` |
| 94 | pub fn get_ignore_template(kind: &str) -> Option<&'static str> { |
| 95 | match kind.to_lowercase().as_str() { |
| 96 | "rust" => Some( |
| 97 | r#"# Rust |
| 98 | target/ |
| 99 | **/*.rs.bk |
| 100 | Cargo.lock |
| 101 | |
| 102 | # IDE |
| 103 | .idea/ |
| 104 | .vscode/ |
| 105 | *.swp |
| 106 | *.swo |
| 107 | *~ |
| 108 | |
| 109 | # OS |
| 110 | .DS_Store |
| 111 | Thumbs.db |
| 112 | "#, |
| 113 | ), |
| 114 | "python" => Some( |
| 115 | r#"# Python |
| 116 | __pycache__/ |
| 117 | *.py[cod] |
| 118 | *$py.class |
| 119 | *.so |
| 120 | .Python |
| 121 | build/ |
| 122 | dist/ |
| 123 | *.egg-info/ |
| 124 | .eggs/ |
| 125 | .venv/ |
| 126 | venv/ |
| 127 | ENV/ |
| 128 | .pytest_cache/ |
| 129 | .mypy_cache/ |
| 130 | .coverage |
| 131 | htmlcov/ |
| 132 | |
| 133 | # IDE |
| 134 | .idea/ |
| 135 | .vscode/ |
| 136 | *.swp |
| 137 | *~ |
| 138 | |
| 139 | # OS |
| 140 | .DS_Store |
| 141 | Thumbs.db |
| 142 | "#, |
| 143 | ), |
| 144 | "node" | "javascript" | "typescript" | "js" | "ts" => Some( |
| 145 | r#"# Node.js |
| 146 | node_modules/ |
| 147 | npm-debug.log* |
| 148 | yarn-debug.log* |
| 149 | yarn-error.log* |
| 150 | .npm |
| 151 | .yarn |