-
-
Notifications
You must be signed in to change notification settings - Fork 154
Make FZF / BAT strategies "experimental" #883
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
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7a07999
Remove FZF strategy and auto detection
dantleech bd207a1
Remove quickfix strategy auto-detection
dantleech 09a7959
Remove the documentation
dantleech c663498
Re-add the FZF as experimental
dantleech 9e9e69f
Restructured documentation
dantleech 79b9915
Updated wording
dantleech 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
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
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 |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| Experimental | ||
| ============ | ||
|
|
||
| FZF and BAT | ||
| ----------- | ||
|
|
||
| Experimental functionality with FZF and BAT depends on: | ||
|
|
||
| - [fzf](https://github.com/junegunn/fzf) | ||
| - [bat](https://github.com/sharkdp/bat) | ||
|
|
||
| In addition FZF support requires the FZF VIM plugin: | ||
|
|
||
| [fzf.vim](https://github.com/junegunn/fzf.vim) | ||
|
|
||
| ### FZF Choice Selection | ||
|
|
||
| Some refactorings will allow you to select multiple entires (for example | ||
| [override | ||
| method](https://phpactor.github.io/phpactor/refactorings.html#override-method). | ||
|
|
||
| FZF provides a fuzzy search interface and the possiblity to select multiple | ||
| entries at once. | ||
|
|
||
| Use `<tab>` to toggle selection and CTRL-A/CTRL-D to select all/select none. | ||
|
|
||
| See the [Fzf](https://github.com/junegunn/fzf) documentation for more details. | ||
|
|
||
| Enable this feature by configuring FZF as the `inputlist` strategy in your | ||
| `.vimrc': | ||
|
|
||
| ``` | ||
| let g:phpactorInputListStrategy = 'phpactor#input#list#fzf' | ||
| ``` | ||
|
|
||
| ### FZF Qucikfix with BAT preview | ||
|
|
||
| The VIM quickfix list is used to navigate through a set of references (where a | ||
| reference is a file / character position). | ||
|
|
||
| The FZF strategy provides a layer on top this to allow you to efficiently | ||
| filter, preview and select only those entries you want to navigate to to the | ||
| quickfix list. | ||
|
|
||
| Enable it as follows: | ||
|
|
||
| ``` | ||
| let g:phpactorQuickfixStrategy = 'phpactor#quickfix#fzf' | ||
| ``` |
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 |
|---|---|---|
|
|
@@ -17,10 +17,6 @@ let g:phpactorInitialCwd = getcwd() | |
| let g:phpactorCompleteLabelTruncateLength=50 | ||
| let g:_phpactorCompletionMeta = {} | ||
|
|
||
| " hack to avoid calling fzf strategy when using a collection | ||
| " see: https://github.com/phpactor/phpactor/pull/843 | ||
| let g:_phpactorRpcActionIsCollection = v:false | ||
|
|
||
| if !exists('g:phpactorPhpBin') | ||
| let g:phpactorPhpBin = 'php' | ||
| endif | ||
|
|
@@ -37,8 +33,12 @@ if !exists('g:phpactorCompletionIgnoreCase') | |
| let g:phpactorCompletionIgnoreCase = 1 | ||
| endif | ||
|
|
||
| if !exists('g:PhpactorQuickfixStrategy') | ||
| let g:PhpactorQuickfixStrategy = v:null | ||
| if !exists('g:phpactorQuickfixStrategy') | ||
| let g:phpactorQuickfixStrategy = 'phpactor#quickfix#vim' | ||
| endif | ||
|
|
||
| if !exists('g:phpactorInputListStrategy') | ||
| let g:phpactorInputListStrategy = 'phpactor#input#list#inputlist' | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved these configurations to the main |
||
| endif | ||
|
|
||
| if g:phpactorOmniAutoClassImport == v:true | ||
|
|
@@ -546,9 +546,7 @@ function! phpactor#_rpc_dispatch(actionName, parameters) | |
| " >> collection | ||
| if a:actionName == "collection" | ||
| for action in a:parameters["actions"] | ||
| let g:_phpactorRpcActionIsCollection = v:true | ||
| let result = phpactor#_rpc_dispatch(action["name"], action["parameters"]) | ||
| let g:_phpactorRpcActionIsCollection = v:false | ||
|
|
||
| if !empty(result) | ||
| return result | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed auto-detection - I would prefer everybody had the same base experience - and right now the native capability is more stable.