Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Improve file_types in default.json (#20429)

Peter Tripp343c88574a6b
diff --git a/assets/settings/default.json b/assets/settings/default.json
index 2352e75ee9e..7c4a9a81117 100644
--- a/assets/settings/default.json
+++ b/assets/settings/default.json
@@ -873,15 +873,8 @@
//
"file_types": {
"Plain Text": ["txt"],
- "JSON": ["flake.lock"],
- "JSONC": [
- "**/.zed/**/*.json",
- "**/zed/**/*.json",
- "**/Zed/**/*.json",
- "tsconfig.json",
- "pyrightconfig.json"
- ],
- "TOML": ["uv.lock"]
+ "JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json", "**/Zed/**/*.json"],
+ "Shell Script": [".env.*"]
},
/// By default use a recent system version of node, or install our own.
/// You can override this to use a version of node that is not in $PATH with:
diff --git a/crates/languages/src/json/config.toml b/crates/languages/src/json/config.toml
index c4a91c20b01..dc49f4f36e6 100644
--- a/crates/languages/src/json/config.toml
+++ b/crates/languages/src/json/config.toml
@@ -1,6 +1,6 @@
name = "JSON"
grammar = "json"
-path_suffixes = ["json"]
+path_suffixes = ["json", "flake.lock"]
line_comments = ["// "]
autoclose_before = ",]}"
brackets = [
diff --git a/crates/languages/src/jsonc/config.toml b/crates/languages/src/jsonc/config.toml
index fe62764b279..226ae92912c 100644
--- a/crates/languages/src/jsonc/config.toml
+++ b/crates/languages/src/jsonc/config.toml
@@ -1,6 +1,6 @@
name = "JSONC"
grammar = "jsonc"
-path_suffixes = ["jsonc"]
+path_suffixes = ["jsonc", "tsconfig.json", "pyrightconfig.json"]
line_comments = ["// "]
autoclose_before = ",]}"
brackets = [
diff --git a/extensions/toml/languages/toml/config.toml b/extensions/toml/languages/toml/config.toml
index d5c1172d84a..f62290d9e92 100644
--- a/extensions/toml/languages/toml/config.toml
+++ b/extensions/toml/languages/toml/config.toml
@@ -1,6 +1,6 @@
name = "TOML"
grammar = "toml"
-path_suffixes = ["Cargo.lock", "toml", "Pipfile"]
+path_suffixes = ["Cargo.lock", "toml", "Pipfile", "uv.lock"]
line_comments = ["# "]
autoclose_before = ",]}"
brackets = [