mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-10 05:37:29 +03:00
Fix files that don’t have a prefix
This commit is contained in:
parent
c754c1e9e2
commit
f4413b0969
@ -46,6 +46,7 @@
|
|||||||
"ppt": "document",
|
"ppt": "document",
|
||||||
"pptx": "document",
|
"pptx": "document",
|
||||||
"prettierrc": "prettier",
|
"prettierrc": "prettier",
|
||||||
|
"prettierignore": "prettier",
|
||||||
"ps1": "terminal",
|
"ps1": "terminal",
|
||||||
"psd": "image",
|
"psd": "image",
|
||||||
"py": "code",
|
"py": "code",
|
||||||
|
@ -44,7 +44,14 @@ impl FileAssociations {
|
|||||||
let this = cx.has_global::<Self>().then(|| cx.global::<Self>())?;
|
let this = cx.has_global::<Self>().then(|| cx.global::<Self>())?;
|
||||||
|
|
||||||
iife!({
|
iife!({
|
||||||
let suffix = path.extension()?.to_str()?;
|
let suffix =
|
||||||
|
path.file_name()
|
||||||
|
.and_then(|os_str| os_str.to_str())
|
||||||
|
.and_then(|file_name| {
|
||||||
|
file_name
|
||||||
|
.find('.')
|
||||||
|
.and_then(|dot_index| file_name.get(dot_index + 1..))
|
||||||
|
} )?;
|
||||||
|
|
||||||
this.suffixes
|
this.suffixes
|
||||||
.get(suffix)
|
.get(suffix)
|
||||||
|
@ -47,7 +47,7 @@ export default function project_panel(): any {
|
|||||||
height: 22,
|
height: 22,
|
||||||
background: background(theme.middle),
|
background: background(theme.middle),
|
||||||
chevron_color: foreground(theme.middle, "variant"),
|
chevron_color: foreground(theme.middle, "variant"),
|
||||||
icon_color: foreground(theme.middle, "active"),
|
icon_color: with_opacity(foreground(theme.middle, "active"), 0.3),
|
||||||
chevron_size: 7,
|
chevron_size: 7,
|
||||||
icon_size: 14,
|
icon_size: 14,
|
||||||
icon_spacing: 6,
|
icon_spacing: 6,
|
||||||
|
Loading…
Reference in New Issue
Block a user