Files
oak-gpui/crates
Joseph T. Lyons bed0d1d529 Fix language detection when file name begins with a . (#2833)
I went to add in `zprofile` to the bash language config to get syntax
highlighting for it. After adding it in, Zed was still not highlighting
the file. I checked and saw that we are using `Path::extension()` in
`language_for_file()`, which [returns `None` when a file's name begins
with a
`.`](https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.extension),
such as in the case of `.zprofile`. This PR adds a custom method, with
some tests, that just tries to grab the last component in the file name
if `Path::extension` returns `None`. Not sure if `ext` is the best name,
but I can't use `extension`.

Maybe this method should be called `extension_or_hidden_file_name()`?

Release Notes:

- Fixed a bug where language detection would fail for files starting
with `.` in their names.
- Added syntax highlighting for `.zprofile` files
2023-08-08 21:48:56 -04:00
..
2023-07-20 16:10:20 -04:00
2023-07-18 12:32:53 -04:00
2023-07-14 16:09:02 -07:00
2023-07-23 21:36:29 -07:00
WIP
2023-08-03 17:03:39 -06:00
2023-06-02 22:02:19 -04:00
2023-06-02 22:02:19 -04:00
2023-08-08 11:20:09 -06:00
2023-08-03 18:57:43 -04:00
2023-06-29 22:25:49 +03:00
2023-06-29 22:39:33 +03:00
2023-08-01 10:40:38 -04:00
2023-06-02 22:02:19 -04:00
2023-08-08 11:20:09 -06:00
2023-08-08 11:20:09 -06:00
2023-06-30 22:03:21 +03:00
2023-08-08 16:38:46 -06:00
2023-06-22 18:06:52 +02:00