🚸 improve files dropdown filtering
This commit is contained in:
@@ -354,6 +354,7 @@ const GLOBAL_IGNORE_PATTERNS: &[&str] = &[
|
||||
"*.jpg",
|
||||
"*.jpeg",
|
||||
"*.gif",
|
||||
"*.dmg",
|
||||
"*.mp4",
|
||||
"*.svg",
|
||||
"*.ico",
|
||||
|
||||
@@ -50,12 +50,6 @@ const { exec } = require("child_process");
|
||||
}
|
||||
}
|
||||
);
|
||||
} else {
|
||||
ncp.ncp("sync.node", "out/sync.node", (err) => {
|
||||
if (err) {
|
||||
return console.error(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
fs.mkdirSync("out/node_modules", { recursive: true });
|
||||
|
||||
@@ -314,6 +314,52 @@ class IdeProtocolClient {
|
||||
const nameAndType = (
|
||||
await vscode.workspace.fs.readDirectory(uriFromFilePath(directory))
|
||||
).filter(([name, type]) => {
|
||||
const DEFAULT_IGNORE_FILETYPES = [
|
||||
"DS_Store",
|
||||
"-lock.json",
|
||||
"lock",
|
||||
"log",
|
||||
"ttf",
|
||||
"png",
|
||||
"jpg",
|
||||
"jpeg",
|
||||
"gif",
|
||||
"mp4",
|
||||
"svg",
|
||||
"ico",
|
||||
"pdf",
|
||||
"zip",
|
||||
"gz",
|
||||
"tar",
|
||||
"dmg",
|
||||
"tgz",
|
||||
"rar",
|
||||
"7z",
|
||||
"exe",
|
||||
"dll",
|
||||
"obj",
|
||||
"o",
|
||||
"a",
|
||||
"lib",
|
||||
"so",
|
||||
"dylib",
|
||||
"ncb",
|
||||
"sdf",
|
||||
"woff",
|
||||
"woff2",
|
||||
"eot",
|
||||
"cur",
|
||||
"avi",
|
||||
"mpg",
|
||||
"mpeg",
|
||||
"mov",
|
||||
"mp3",
|
||||
"mp4",
|
||||
"mkv",
|
||||
"mkv",
|
||||
"webm",
|
||||
"jar",
|
||||
];
|
||||
const DEFAULT_IGNORE_DIRS = [
|
||||
".git",
|
||||
".vscode",
|
||||
@@ -333,11 +379,12 @@ class IdeProtocolClient {
|
||||
".vscode-test",
|
||||
".continue",
|
||||
"__pycache__",
|
||||
// Files
|
||||
".DS_Store",
|
||||
];
|
||||
if (
|
||||
!DEFAULT_IGNORE_DIRS.some((dir) => name.split(path.sep).includes(dir))
|
||||
!DEFAULT_IGNORE_DIRS.some((dir) =>
|
||||
name.split(path.sep).includes(dir)
|
||||
) &&
|
||||
!DEFAULT_IGNORE_FILETYPES.some((filetype) => name.endsWith(filetype))
|
||||
) {
|
||||
return name;
|
||||
}
|
||||
|
||||
1
sync/Cargo.lock
generated
1
sync/Cargo.lock
generated
@@ -473,6 +473,7 @@ version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user