let g:acp_behaviorKeywordIgnores = ['new', 'var', 'in', 'do', 'els', 'end', 'ret', 'for', 'fun']
" Use nitls to compute all interesting files from the current directory and the standard library
- for file in split(system('nitls -M standard .', '\n'))
+ for file in split(system('nitls -M core .', '\n'))
silent let &complete = &complete . ',s' . file
silent set complete?
endfor
" Found no doc, give up
if empty(docs) || !(join(docs, '') =~ '\w')
+ echo 'Nitdoc found nothing for "' . word . '"'
return
endif
silent put = ''
endif
endfor
+ execute 0
+ delete " the first empty line
" Set options
setlocal buftype=nofile
redraw!
endfun
-" Activate the omnifunc on Nit files
-autocmd FileType nit set omnifunc=NitOmnifunc
+if !exists("g:nit_disable_omnifunc") || !g:nit_disable_omnifunc
+ " Activate the omnifunc on Nit files
+ autocmd FileType nit set omnifunc=NitOmnifunc
+endif
" Define the user command Nitdoc for ease of use
command -nargs=* Nitdoc call Nitdoc("<args>")