You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a programmer, I can understand why Zed would consider the extension / suffix anything after the last ., however as a user / extension author, I'd expect what I tried to do to "just work". Essentially, I'd expect the logic for path_suffixes to match any files which end with one of those strings (even if one of those strings include a .).
Workaround: I guess I could add just sub to path_suffixes to make it work for myself, but that doesn't "feel right" as it would conflict with any other language files which might end in .sub.
I have a similar issue working on a lang extension for Laravel Blade files, which use the suffix .blade.php. Using path_suffixes = ["blade.php"] doesn't work as Zed still opens these files as just PHP. There was limited discussion on the original extensions tracking issue, and it was suggested that using the longest matching suffix could be 1 way to disambiguate which extension/language to use for a given file.
Check for existing issues
I found this other issue which seems almost the same, except it talks about wildcards:
#8466
Describe the bug / provide steps to reproduce it
My extension:
https://github.com/olehermanse/zed-cfengine
Is not highlighting some of our test files which use the
.cf.sub
extension:https://github.com/cfengine/core/blob/d7227da3cb47cbe8b6079559acac3cb6374f1a10/tests/acceptance/run_with_server.cf.sub
Even though I added it to the
path_suffixes
:olehermanse/zed-cfengine@f854236
As a programmer, I can understand why Zed would consider the extension / suffix anything after the last
.
, however as a user / extension author, I'd expect what I tried to do to "just work". Essentially, I'd expect the logic forpath_suffixes
to match any files which end with one of those strings (even if one of those strings include a.
).Workaround: I guess I could add just
sub
topath_suffixes
to make it work for myself, but that doesn't "feel right" as it would conflict with any other language files which might end in.sub
.Environment
Zed: v0.131.7 (Zed)
OS: macOS 14.4.1
Memory: 32 GiB
Architecture: x86_64
The text was updated successfully, but these errors were encountered: