diff runtime/ftplugin/erlang.vim @ 30634:f68f43043842

Update runtime files Commit: https://github.com/vim/vim/commit/f269eabc6c4f5bdcef989cd5b4b95ba8ccaa4d8a Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 3 18:04:35 2022 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Mon, 03 Oct 2022 19:15:04 +0200
parents e2e2cc5d0856
children f5c639a69421
line wrap: on
line diff
--- a/runtime/ftplugin/erlang.vim
+++ b/runtime/ftplugin/erlang.vim
@@ -5,7 +5,7 @@
 " Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
 "               Eduardo Lopez (http://github.com/tapichu)
 "               Arvid Bjurklint (http://github.com/slarwise)
-" Last Update:  2021-Jan-08
+" Last Update:  2021-Nov-22
 " License:      Vim license
 " URL:          https://github.com/vim-erlang/vim-erlang-runtime
 
@@ -30,6 +30,28 @@ setlocal commentstring=%%s
 
 setlocal formatoptions+=ro
 
+if get(g:, 'erlang_extend_path', 1)
+  " typical erlang.mk paths
+  let &l:path = join([
+        \ 'deps/*/include',
+        \ 'deps/*/src',
+        \ 'deps/*/test',
+        \ 'deps/*/apps/*/include',
+        \ 'deps/*/apps/*/src',
+        \ &g:path], ',')
+  " typical rebar3 paths
+  let &l:path = join([
+        \ 'apps/*/include',
+        \ 'apps/*/src',
+        \ '_build/default/lib/*/src',
+        \ '_build/default/*/include',
+        \ &l:path], ',')
+  " typical erlang paths
+  let &l:path = join(['include', 'src', 'test', &l:path], ',')
+
+  set wildignore+=*/.erlang.mk/*,*.beam
+endif
+
 setlocal suffixesadd=.erl,.hrl
 
 let &l:include = '^\s*-\%(include\|include_lib\)\s*("\zs\f*\ze")'