Skip to content

Commit 5793dc3

Browse files
committed
Copy buffer opt-out from Projectionist
1 parent f053490 commit 5793dc3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugin/sleuth.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,12 @@ function! s:DetectDeclared() abort
481481
let detected.path = s:Slash(call(pre . 'Real', [detected.path]))
482482
endif
483483

484+
try
485+
if len(detected.path) && exists('*ExcludeBufferFromDiscovery') && !empty(ExcludeBufferFromDiscovery(detected.path, 'sleuth'))
486+
let detected.path = ''
487+
endif
488+
catch
489+
endtry
484490
let [detected.editorconfig, detected.root] = s:DetectEditorConfig(detected.path)
485491
call extend(detected.declared, s:EditorConfigToOptions(detected.editorconfig))
486492
call extend(detected.declared, s:ModelineOptions())

0 commit comments

Comments
 (0)