editor: In OpenFile check if file with path_suffix exists (#17805)
Demo: https://github.com/user-attachments/assets/6acb6c1e-bb15-4205-9dcb-2aa4bb99dcf9 Release Notes: - When using `OpenFile` (`gf` in Vim mode) and the word under the cursor is not an existing file path, we now fall back and additionally check whether a file called `<word-under-cursor>.<language-specific-path-suffixes>` exists. That's similar to Vim's `suffixesadd` option. --------- Co-authored-by: Abdelhakim Qbaich <abdelhakim@qbaich.com> Co-authored-by: Pete LeVasseur <plevasseur@gmail.com>
This commit is contained in:
co-authored by
Abdelhakim Qbaich
Pete LeVasseur
parent
8f833ea029
commit
adbe973f02
@@ -1410,6 +1410,10 @@ impl Language {
|
||||
}
|
||||
|
||||
impl LanguageScope {
|
||||
pub fn path_suffixes(&self) -> &[String] {
|
||||
&self.language.path_suffixes()
|
||||
}
|
||||
|
||||
pub fn language_name(&self) -> LanguageName {
|
||||
self.language.config.name.clone()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user