We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent6d8e4a6 commitb9d7f56Copy full SHA for b9d7f56
ale_linters/perl/languageserver.vim
@@ -9,7 +9,7 @@ function! ale_linters#perl#languageserver#GetProjectRoot(buffer) abort
9
" Makefile.PL, https://perldoc.perl.org/ExtUtils::MakeMaker
10
" Build.PL, https://metacpan.org/pod/Module::Build
11
" dist.ini, https://metacpan.org/pod/Dist::Zilla
12
-letl:potential_roots= ['Makefile.PL','Build.PL','dist.ini','.git' ]
+letl:potential_roots= ['Makefile.PL','Build.PL','dist.ini' ]
13
14
forl:rootinl:potential_roots
15
letl:project_root=ale#path#FindNearestFile(a:buffer,l:root)
@@ -19,6 +19,12 @@ function! ale_linters#perl#languageserver#GetProjectRoot(buffer) abort
19
endif
20
endfor
21
22
+letl:project_root=ale#path#FindNearestFileOrDirectory(a:buffer,'.git')
23
+
24
+if!empty(l:project_root)
25
+returnfnamemodify(l:project_root .'/',':p:h:h')
26
+endif
27
28
returnfnamemodify(expand('#' .a:buffer .':p:h'),':p:h')
29
endfunction
30