From 2d763a9a1baa68c7dcbe0637c271ed0cc90eeaaf Mon Sep 17 00:00:00 2001 From: Colin Heffernan Date: Thu, 3 Oct 2024 16:41:41 -0400 Subject: [PATCH] ignore/types: add `*.svelte.ts` to Svelte file type glob I was somewhat unsure about adding this, since `.svelte.ts` seems primarily like a TypeScript file and it could be surprising to show up in a search for Svelte files. In particular, ripgrep doesn't know how to only search the Svelte stuff inside of a `.svelte.ts` file, so you could end up with lots of false positives. However, I was swayed[1] by the argument that the extension does actually include `svelte` in it, so maybe this is fine. Please open an issue if this change ends up being too annoying for most users. Closes #2874, Closes #2909 [1]: https://github.com/BurntSushi/ripgrep/issues/2874#issuecomment-3126892931 --- crates/ignore/src/default_types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ignore/src/default_types.rs b/crates/ignore/src/default_types.rs index 53b192ac..fb24c782 100644 --- a/crates/ignore/src/default_types.rs +++ b/crates/ignore/src/default_types.rs @@ -267,7 +267,7 @@ pub(crate) const DEFAULT_TYPES: &[(&[&str], &[&str])] = &[ (&["sql"], &["*.sql", "*.psql"]), (&["stylus"], &["*.styl"]), (&["sv"], &["*.v", "*.vg", "*.sv", "*.svh", "*.h"]), - (&["svelte"], &["*.svelte"]), + (&["svelte"], &["*.svelte", "*.svelte.ts"]), (&["svg"], &["*.svg"]), (&["swift"], &["*.swift"]), (&["swig"], &["*.def", "*.i"]),