From f17f59a36bb0e0d5321e151fa05087387e96a747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AA=E3=82=A6=E3=82=B9?= Date: Tue, 21 May 2024 17:09:04 -0500 Subject: [PATCH] Removed HasHugoConfigFile check as it doesn't work https://github.com/robertbasic/vim-hugo-helper/issues/13 --- plugin/hugohelper.vim | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/plugin/hugohelper.vim b/plugin/hugohelper.vim index be94563..2b6c69b 100644 --- a/plugin/hugohelper.vim +++ b/plugin/hugohelper.vim @@ -85,27 +85,11 @@ function! s:IsFileInHugoContentDirectory(filepath) let l:mods .= ':h' let l:dirname = fnamemodify(l:path, ':t') if l:dirname == g:hugohelper_content_dir - " Check if the parent of the content directory contains a config file. - let l:parent = fnamemodify(l:path, ":h") - if s:HasHugoConfigFile(l:parent) - return v:true - endif + return v:true endif endwhile return v:false endfunction -function! s:HasHugoConfigFile(dir) - " :p adds the final path separator if a:dir is a directory. - let l:dirpath = fnamemodify(a:dir, ':p') - for config in g:hugohelper_site_config - let l:file = l:dirpath . config - if filereadable(l:file) - return v:true - endif - endfor - return v:false -endfunction - " vim: expandtab shiftwidth=4