Repository navigation
Fix ftplugin #964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix ftplugin #964
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
28d3f40
Make g:_phpactorCompletionMeta a local script variable
camilledejoye 7d82d07
Move config init to plugin directory
camilledejoye 5d1a3e3
Rename g:phpactorLoaded to g:loaded_phpactor
camilledejoye bd91a3b
Move check for auto import in the function directly
camilledejoye File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,58 +1,7 @@ | ||
| if exists('g:phpactorLoaded') | ||
| finish | ||
| endif | ||
|
|
||
| let g:phpactorLoaded = 1 | ||
| let g:phpactorpath = expand('<sfile>:p:h') . '/..' | ||
| let g:phpactorbinpath = g:phpactorpath. '/bin/phpactor' | ||
| let g:phpactorInitialCwd = getcwd() | ||
| let g:phpactorCompleteLabelTruncateLength=50 | ||
| let g:_phpactorCompletionMeta = {} | ||
|
|
||
| "" | ||
| " Path to the PHP binary used by Phpactor | ||
| let g:phpactorPhpBin = get(g:, 'phpactorPhpBin', 'php') | ||
|
|
||
| "" | ||
| " The Phpactor branch to use when calling @command(PhpactorUpdate) | ||
| let g:phpactorBranch = get(g:, 'phpactorBranch', 'master') | ||
|
|
||
| "" | ||
| " Automatically import classes when using VIM native omni-completion | ||
| let g:phpactorOmniAutoClassImport = get(g:, 'phpactorOmniAutoClassImport', v:true) | ||
|
|
||
| "" | ||
| " Ignore case when suggestion completion results | ||
| let g:phpactorCompletionIgnoreCase = get(g:, 'phpactorCompletionIgnoreCase', 1) | ||
|
|
||
| "" | ||
| " Function to use when populating a list of code references. The default | ||
| " is to use the VIM quick-fix list. | ||
| let g:phpactorQuickfixStrategy = get(g:, 'phpactorQuickfixStrategy', 'phpactor#quickfix#vim') | ||
|
|
||
| "" | ||
| " Function to use when presenting a user with a choice of options. The default | ||
| " is to use the VIM inputlist. | ||
| let g:phpactorInputListStrategy = get(g:, 'phpactorInputListStrategy', 'phpactor#input#list#inputlist') | ||
|
|
||
| "" | ||
| " When jumping to a file location: if the target file open in a window, switch | ||
| " to that window instead of switching buffers. The default is false. | ||
| let g:phpactorUseOpenWindows = get(g:, 'phpactorUseOpenWindows', v:false) | ||
|
|
||
| "" | ||
| " The list of files that determine workspace root directory | ||
| " if contained within | ||
| let g:phpactorProjectRootPatterns = get(g:, 'phpactorProjectRootPatterns', ['composer.json', '.git', '.phpactor.json', '.phpactor.yml']) | ||
|
|
||
| "" | ||
| " The list of directories that should not be considered as workspace root directory | ||
| " (in addition to '/' which is always considered) | ||
| let g:phpactorGlobalRootPatterns = get(g:, 'phpactorGlobalRootPatterns', ['/', '/home']) | ||
|
|
||
| if g:phpactorOmniAutoClassImport == v:true | ||
| autocmd CompleteDone *.php call phpactor#_completeImportClass(v:completed_item) | ||
| endif | ||
| augroup PhpactorInit | ||
| autocmd! * <buffer> | ||
| autocmd CompleteDone <buffer> call phpactor#_completeImportClass(v:completed_item) | ||
| augroup END | ||
|
|
||
|
|
||
| " vim: et ts=4 sw=4 fdm=marker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| if exists('g:loaded_phpactor') | ||
|
camilledejoye marked this conversation as resolved.
Resolved
|
||
| finish | ||
| endif | ||
|
|
||
| let g:loaded_phpactor = 1 | ||
| let g:phpactorpath = expand('<sfile>:p:h') . '/..' | ||
| let g:phpactorbinpath = g:phpactorpath. '/bin/phpactor' | ||
| let g:phpactorInitialCwd = getcwd() | ||
| let g:phpactorCompleteLabelTruncateLength=50 | ||
|
|
||
| "" | ||
| " Path to the PHP binary used by Phpactor | ||
| let g:phpactorPhpBin = get(g:, 'phpactorPhpBin', 'php') | ||
|
|
||
| "" | ||
| " The Phpactor branch to use when calling @command(PhpactorUpdate) | ||
| let g:phpactorBranch = get(g:, 'phpactorBranch', 'master') | ||
|
|
||
| "" | ||
| " Automatically import classes when using VIM native omni-completion | ||
| let g:phpactorOmniAutoClassImport = get(g:, 'phpactorOmniAutoClassImport', v:true) | ||
|
|
||
| "" | ||
| " Ignore case when suggestion completion results | ||
| let g:phpactorCompletionIgnoreCase = get(g:, 'phpactorCompletionIgnoreCase', 1) | ||
|
|
||
| "" | ||
| " Function to use when populating a list of code references. The default | ||
| " is to use the VIM quick-fix list. | ||
| let g:phpactorQuickfixStrategy = get(g:, 'phpactorQuickfixStrategy', 'phpactor#quickfix#vim') | ||
|
|
||
| "" | ||
| " Function to use when presenting a user with a choice of options. The default | ||
| " is to use the VIM inputlist. | ||
| let g:phpactorInputListStrategy = get(g:, 'phpactorInputListStrategy', 'phpactor#input#list#inputlist') | ||
|
|
||
| "" | ||
| " When jumping to a file location: if the target file open in a window, switch | ||
| " to that window instead of switching buffers. The default is false. | ||
| let g:phpactorUseOpenWindows = get(g:, 'phpactorUseOpenWindows', v:false) | ||
|
|
||
| "" | ||
| " The list of files that determine workspace root directory | ||
| " if contained within | ||
| let g:phpactorProjectRootPatterns = get(g:, 'phpactorProjectRootPatterns', ['composer.json', '.git', '.phpactor.json', '.phpactor.yml']) | ||
|
|
||
| "" | ||
| " The list of directories that should not be considered as workspace root directory | ||
| " (in addition to '/' which is always considered) | ||
| let g:phpactorGlobalRootPatterns = get(g:, 'phpactorGlobalRootPatterns', ['/', '/home']) | ||
|
|
||
| " vim: et ts=4 sw=4 fdm=marker | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.