purescript-contrib / purescript-vim

Syntax highlighting and indentation for PureScript
BSD 2-Clause "Simplified" License
154 stars 35 forks source link

add option to disable setting include #65

Open cdepillabout opened 5 years ago

cdepillabout commented 5 years ago

It would be nice to add an option to disable setting include:

https://github.com/purescript-contrib/purescript-vim/blob/67ca4dc4a0291e5d8c8da48bffc0f3d2c9739e7f/ftplugin/purescript.vim#L2-L3

Setting include causes keyword completion to take a very long time to finish. Keyword completion is triggered with Ctrl-P or Ctrl-N in insert mode. There doesn't appear to be any caching of files processed for keyword completion, so it basically becomes unusable when there are multiple imports in a PS file.

As a workaround, it is possible to disable keyword completion from included files with a line like the following:

autocmd FileType purescript setlocal complete=.,w,b,u,t

Here is the documentation for the complete option:

http://vimdoc.sourceforge.net/htmldoc/options.html#'complete'