Fix ftdetect with other protocols (like oil://)

This commit is contained in:
2024-05-21 15:47:20 +02:00
parent 0c0ad99aab
commit a210a8c0bb

View File

@@ -3,7 +3,7 @@ function! s:isHelm()
let filename = expand("%:t") let filename = expand("%:t")
if filepath =~ '\v/(templates|charts)/.*\.(ya?ml|gotmpl|tpl|txt)$' | return 1 | en if filepath =~ '\v/(templates|charts)/.*\.(ya?ml|gotmpl|tpl|txt)$' | return 1 | en
if filename =~ '\v(helmfile).ya?ml' | return 1 | en if filename =~ '\v(helmfile).ya?ml' | return 1 | en
if !empty(findfile("Chart.yaml", expand('%:p:h').';')) | return 1 | en if filepath !~ '\v^\w+://' && !empty(findfile("Chart.yaml", expand('%:p:h').';')) | return 1 | en
return 0 return 0
endfunction endfunction