Skip to content

Commit

Permalink
Improve file_types in default.json (zed-industries#20429)
Browse files Browse the repository at this point in the history
Detect .env.* as Shell Script
Move non glob json/jsonc/toml file_types into langauges/*/config.toml
  • Loading branch information
notpeter authored Nov 19, 2024
1 parent e7a0890 commit 343c885
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
11 changes: 2 additions & 9 deletions assets/settings/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion crates/languages/src/json/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "JSON"
grammar = "json"
path_suffixes = ["json"]
path_suffixes = ["json", "flake.lock"]
line_comments = ["// "]
autoclose_before = ",]}"
brackets = [
Expand Down
2 changes: 1 addition & 1 deletion crates/languages/src/jsonc/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "JSONC"
grammar = "jsonc"
path_suffixes = ["jsonc"]
path_suffixes = ["jsonc", "tsconfig.json", "pyrightconfig.json"]
line_comments = ["// "]
autoclose_before = ",]}"
brackets = [
Expand Down
2 changes: 1 addition & 1 deletion extensions/toml/languages/toml/config.toml
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down

0 comments on commit 343c885

Please sign in to comment.