Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/vim-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ let g:phpactorOmniAutoClassImport = v:true
- `g:phpactorOmniAutoClassImport`: Automatically import classes when
completing class names with OmniComplete.


Extensions
----------

Expand Down Expand Up @@ -203,13 +204,19 @@ autocmd FileType php setlocal omnifunc=phpactor#Complete
To invoke omni complete in insert mode `<C-x><C-o>` (`ctrl-x` then `ctrl-o`).
See `:help compl-omni`.

For case sensitive searching, set
```vimscript
let g:phpactorCompletionIgnoreCase = 0
```

Omni complete can also provide feedback when something fails to complete, this
can be useful, enable it with:

```
let g:phpactorOmniError = v:true
```


Completion plugins
------------------

Expand Down
7 changes: 6 additions & 1 deletion plugin/phpactor.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ if !exists('g:phpactorOmniAutoClassImport')
let g:phpactorOmniAutoClassImport = v:true
endif

if !exists('g:phpactorCompletionIgnoreCase')
let g:phpactorCompletionIgnoreCase = 1
endif

if g:phpactorOmniAutoClassImport == v:true
autocmd CompleteDone *.php call phpactor#_completeImportClass(v:completed_item)
endif
Expand Down Expand Up @@ -85,7 +89,8 @@ function! phpactor#Complete(findstart, base)
\ 'abbr': phpactor#_completeTruncateLabel(suggestion['label'], g:phpactorCompleteLabelTruncateLength),
\ 'menu': suggestion['short_description'],
\ 'kind': suggestion['type'],
\ 'dup': 1
\ 'dup': 1,
\ 'icase': g:phpactorCompletionIgnoreCase
\ }
call add(completions, completion)
let g:_phpactorCompletionMeta[phpactor#_completionItemHash(completion)] = suggestion
Expand Down