Skip to content
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

Make FZF / BAT strategies "experimental" #883

Merged
merged 6 commits into from Feb 15, 2020
Merged

Conversation

dantleech
Copy link
Collaborator

@dantleech dantleech commented Feb 9, 2020

FZF (and BAT) offers a good experience but they're not without it's drawbacks.

This PR:

  • Removes the strategy auto-dection
  • Simplifies the configuratoin value to be a single callable string
  • Defaults to the basic VIM functionality.
  • Updates the documentation to have a "vim plugin experimental" page detailing the FZF and BAT integrations.

endif

if !exists('g:phpactorInputListStrategy')
let g:phpactorInputListStrategy = 'phpactor#input#list#inputlist'
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved these configurations to the main phpactor.vim so all configs are in the same place, and made them more explicitly callbacks.

@@ -1,45 +1,15 @@
function! phpactor#quickfix#strategy() abort
Copy link
Collaborator Author

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.

@dantleech dantleech mentioned this pull request Feb 9, 2020
8 tasks
@camilledejoye
Copy link
Contributor

I haven't tested but it's fined by me.
You could even remove it entirely from master it's not a problem as long as it is available on develop.

@dantleech dantleech merged commit 11b080f into develop Feb 15, 2020
@dantleech dantleech deleted the remove-fzf-bat-qflist branch February 15, 2020 15:09
dantleech added a commit that referenced this pull request Mar 1, 2020
* Validate composer file in CI (#814)

* Goto Class Implementation(s) (#818)

* Find implementations

* Updated docs and plugin

* Fix instanceof bug in WR

* Gh 816 update cl (#819)

* Validate composer file in CI

* Use stable stability

* Fixed import-class menu entry regression #816

Updated CHANGELOG

* Fixes version in changelog

* Fixes import-class attempt #2 #816

* Updates composer.lock

* Fix #816 via. text-document update

* Fix 6.0 typo (#824)

* Bugfix 777 (#825)

* ContextMenuHandler looks for the closest resolvable node

* Updates the handler for worse-reflection changes

* ContextMenuHandler uses InterestingOffsetFinder

* Updates ContextMenuHandlerTest.php

* Updated composer.lock

  jetbrains/phpstorm-stubs 4c8579a5..40d569b2

    [2018-10-05 19:47:32] 98b5d94b sjlehn Add docs for mysqli_result close and free_result
    [2019-09-12 18:26:49] 4cf0ab5b web-flow password_hash can return null
    [2019-09-17 15:47:17] a7554468 <???> Add mysqli extension to the reference Docker image + fix all failures
    [2019-09-17 15:49:43] 8f55cf5a <???> Provide an updated map
    [2019-09-17 16:40:05] 4bd6fa12 <???> Enable all easy to install extensions + fix stubs according to new tests
    [2019-09-17 16:49:02] 0828e8e1 <???> Update libraries
    [2019-09-18 11:59:28] ad0b31e2 <???> Fix parsing of constants with negative value, add missing constants, fix constant values
    [2019-09-18 14:17:14] 49c41666 <???> Fix test for parent interfaces + fix all mongodb interfaces
    [2019-09-18 14:17:37] 42746516 <???> Fix stubs according to new tests
    [2019-09-18 14:39:59] f3a010af <???> Add new extensions + fixes for them
    [2019-09-20 11:31:20] 485c2da9 web-flow Add missing Rdkafka\Message::$len property  Source code that proves that this prope...
    [2019-09-24 16:34:56] 8e545a4c web-flow sha1/md5 default values  value of `$raw_output` is `false` by default    https://gi...
    [2019-09-25 08:06:40] f2912734 zonuexe round(), floor() and ceil() return float or false  These functions return `FALSE` va...
    [2019-10-01 09:37:10] 263786eb web-flow Update stubs for PHP 7.2 (#662)  * WI-37330 Update stubs for PHP 7.2    https://git...
    [2019-10-01 18:46:04] cb148bd0 web-flow Updating default value of intval 2nd parameter  The default of the second parameter...
    [2019-10-02 10:11:55] 08ea0a36 web-flow add @throws to the mongodb  adding @throws to the mongodb/Manager::executeBulkWrite...
    [2019-10-02 13:14:57] ed0b51f9 SvetlanaZem Don't use bugfix number in deprecation tag
    [2019-10-08 12:42:03] a2aef047 andrey-sokolov Non-recurrect true and false constants declaration
    [2019-10-11 20:32:41] e1273310 sjlehn Add since and link tags to session_create_id
    [2019-10-14 10:53:43] 9b3b8398 luzat Fix mb_ereg and mb_eregi reference parameters  Closes #WI-30806.
    [2019-10-14 11:19:43] cdb92e37 <???> Add deprecation for inheritor of `Reflector` interface Fixes WI-48755
    [2019-10-14 13:29:38] 161bbd95 terdia Fixes incorrect signature of preg_split in pcre.php
    [2019-10-14 17:01:15] d1ea83ed <???> Fix indentation
    [2019-10-14 19:57:33] 3ff179fc alister Update - Stubs: Out of date definition for E_ALL.  Closes WI-39737
    [2019-10-14 20:15:19] debaf802 alister DATE_COOKIE-definition-is-incorrect  DateTime::COOKIE is the same value.  Closes WI-...
    [2019-10-14 20:22:50] d9aafe9b alister Value has been fixed.
    [2019-10-14 20:27:40] e6b69b34 alister Value has been fixed, do not mute.
    [2019-10-14 23:10:02] 9cdd45e8 web-flow Fix docblock alignment in SPL_c1
    [2019-10-15 08:58:11] 4df66729 maciejlew Fix SplFileObject::fwrite docs
    [2019-10-15 13:19:09] 84d306ab luzat Replace mixed return types in Core.  Part of WI-32359. Also allows null parameter for ...

  phpactor/code-transform 0cf4f200..f50f1563

    [2019-10-13 16:39:24] 0420e6fb web-flow Use existing version of worse reflection
    [2019-10-14 08:01:54] 69ab60fb dantleech Failing test for finding interesting method call
    [2019-10-14 17:50:10] 3c61923a dantleech Use the original offset if it's interesting

  phpactor/map-resolver 6c467a07..21ef588c

    [2019-08-24 14:04:06] 80ca04e6 dantleech Update LICENSE
    [2019-09-29 10:27:43] c9a8d6fb dantleech Merge required
    [2019-09-29 10:30:30] 21ef588c dantleech Adds test

* Added link to phpactor-mappings package (#826)

* Added link to phpactor-mappings package

* Update vim-plugin.md

* Update vim-plugin.md

* Fix context menu handler callback offset (#827)

The original offset should be used in the callback from the
context menu, not the resolved one.

Actually not sure why it makes a difference if the offset used
is the resolved one, and not the original.

* Vim extract functions handles motions (#823)

* Refactor _selectionStart and _selectionEnd

The goal is to be able to reuse the logic with any mark. So I extracted
the logic inside to private function and refactor the two already
existing.

* Adds a function to extract a constant

* Rework ExtractExpression() to handle motions

* Rework ExtractMethod() to handle motions

* Add keepjumps when using "goto" (#828)

* Add keepjumps when using "goto"

Make a better user experience by preserving je jumplist

* Updates the changelog

* Updates text-document to fix #833 (#834)

* Updates maestro.json

* Explodes package config

* Fix keepjumps for the goto feature (#837)

* Fzf references (#832)

* Adds a function to get the relative path from an absolute path

* Uses fzf to open refernces if available

* Only search within the filename (exclude line and column numbers)

* Makes some optimization

The flow is now:
1) Check if only one reference to the current file -> stop
2) If fzf.vim not available -> use the quickfix list
3) Otherwise format what will be show
    -> More readable
    -> Allow to filter on filename and on the line of the reference
4) Open fzf with preview in fullwidth
    -> Allow to see filename + line with ease
    -> Don't need to see the current buffer when filtering

* Jumps to the position of the reference when opening a file from fzf

* Updates the doc to talk about fzf&bat

* Extract the quickfix building threw zfz in a separate file

* Adds an option to disable the use of fzf to build the quickfix

* Removes trailing spaces in phpactor.vim

* Adds an header in the fzf windows to tell about CTRL-Q

* Removes the header `fzf &fzf.vim` in the doc

* Rework the quickfix feature to include strategies

* Updates the doc after the feedbacks

* Move option definition to phpactor.vim (#839)

* Updated to new maestro schema

* Fix for #841 (#842)

* Refactored JSONs to make version a variable

* bugfix: Worse Reflection - key resolves to unknown fixes #841

* Unresolvable classes import #2 (#847)

* Import Unresolvable Classes

Refactoring to import all unresolvable classes

* Updates composer lock

* Adds doc and rename to => missing classes

* Add closing underscore

* Updates lock

* Revert erronous changes to configs

* Always use inputlist strategy for collections

* Moves decision to use inputlist strategy to dedicated function

* Composer update (#849)

* Fixed maestro package configurations

* Updates composer.lock

* Updated composer

* Updated CHANGELOG

* Support PHP 7.4 Property Types (#854)

* Updates code-builder (#863)

* Handle templates by php version (#869)

* Reorder the template paths

Reorder the templates path by priority so we can override phpactor's
templates.
For information it didn't seem to be the case before, we could add new
templates but not override an existing one.

* Add php.version_id as parameter

* Update CodeTransformExtraExtension to register extra template paths

For each defined template path we will look for directories which name
is a number of 5 digit and consider this name as a PHP version ID.
For each of these directory which corresponds to a version under or
equal to the current PHP version ID we will add them as a loader to
Twig, ordered by ascendant version.

This way we will have something like:
<project_root>/.phpactor/templates
<xdg_config>/phpactor/templates
<app>/templates/70400
<app>/templates/70200
<app>/templates

Which represent the priority in which the templates will be looked for.

Easy to tests, I added `70400/Property.php.twig` in the `code-builder`
packages.
Override the `php.version_id` to 70200 and try to complete a constructor
parameters: the properies added will have a phpdoc block if they had a
type
Do the same thing with `php.verion_id` to 70400: the propery will have a
type and no phpdoc block

* Update CHANGELOG.md

* Move the logic to resolve templates paths in code-transform package

* Use PHP_VERSION format instead of PHP_VERSION_ID

* Update TemplatePathsResolver use statement after moving it into
code-builder

* Rename TemplatePathResolver to PhpVersionPathResolver

* Use phpversion as default

* Updated config

* Updated lock file

* Rename constants and php version key

Co-authored-by: Camille Dejoye <camilledejoye@gmail.com>

* Only import unique names (class import all) (#870)

* Only import unique names (class import all)

* Fix unit tests and update worse reflection

* The undocumented Expand Class (#871)

* Add desciption for Expand Class in doc

* Fix: Expand class missing leading \ for FQN

Definition for fully qualified name should begin with \
See: https://www.php.net/manual/en/language.namespaces.rules.php

* Revert "Fix: Expand class missing leading \ for FQN"

This reverts commit 93d99db.
See #871 (review)

* Fix typo

* Make the sentences more acceptable

* Integrates the code transform "style fixer" / sanitizer. (#862)

* Integrate fixer PR

* Adds smoke test for fix code style command

* Updates composer and changelog

* Use new code transform fixer

* Updated changelog

* Updated composer

* Fix plugin expectation

* Added documentation about fixer settings

* Support for generating code with nullable types (#876)

* Improved CS fixer (#878)

* Improved CS fixer

- Better indentation
- Better CS intersection

* Updated test

* Revert style fixer (#880)

* Remove fix code style command

* Revert the style fixer changes

This approach turned out to be too complicated and took far too much
time. Reverting to the previous, more stable, behavior.

* Rebased and updated composer.lock

* Only 1 file is actually affected here

* Revert cs-fixed test change

* Updated composer

* Make FZF / BAT strategies "experimental" (#883)

* Remove FZF strategy and auto detection

Use standard inputlist by default

* Remove quickfix strategy auto-detection

* Remove the documentation

* Re-add the FZF as experimental

* Restructured documentation

* Updated wording

* Change document to not install dev deps

* Added Phpversoin resolver extension (#884)

* [vim-plugin] Catch json_decode errors

* Updated CHANGELOG

removes some features which are now removed

* Preserve original path if available when generating new class (#796)

the ClassNew class can accept either an FQN or a file path, prior to
this fix if it was given a file path, it converted it to a class name,
but then used the class name to convert it back to the file path - which
is not 100% reliable, as it's possible for a class to exist at multiple
locations.

This fix preserves the file location if given.

* Support aliases with complete constructor (#887)

* Support renaming variables from use (#888)

* VIM Plugin Resturcturing and help (#889)

* Updating VIM plugin

* Adds commands and documentation

* Added documentation for mappings

* Removed duplicated doc in MD file

* Use setting reference

* Updated vimdoc

* Removed functions from autoload

* Reverted deletion of plugin functions

* Adding explicit completion docs

* Removes TOC for plugin as there isn't much doc left

* Moved vim tests

* Added CHANGELOG

* Added documentation on generating the vimdoc

* Use wildcard to run vim tests

* Exit fzf immediatley with no result (#895)

it also removes syntax error that revealed after running with '--exit-0'

* Allow to reuse open window when go to definition (#893)

* Allow to reuse open window when go to definition

* Add help text

* Do not use <SID> without a necessity

* Updated doc and changelog

* Add the autogenerated disclaimer

* Stable Context Menu Shortcuts (#897)

* Bump rpc extension version

* Refactored menu

* Bumps minimum version to 7.2

* Refactored handler to use richer model

* Adds stable shortcuts

* Remove 7.1 from travis

* Fix cs:

* Use stable version

* Updateed changelog

* Add shortcut at end if not present in label

* Make fromArray static

* Remove unnecessary variable

* Added comment about empty keyMap check

* Updated composer to stable deps

* Remove goto implementation context action

The implementation isn't yet stable or included by default

* Resolve SF console dep issue

* Allow earlier versions of package-versions

* Updatec omposer

* Re-add platform

It's there because we can't test on PHP 7.2 otherwise due to
dev-dependency conflicts:

```
ocramius/package-versions 1.5.1 requires php ^7.3.0 -> your PHP version (7.2.15) does not satisfy that requirement.
```

* Updated lock file

* Remove dead implementation finder

Co-authored-by: Chin Leung <hello@chinleung.com>
Co-authored-by: Camille Dejoye <camilledejoye@gmail.com>
Co-authored-by: Qz <38932402+QzCurious@users.noreply.github.com>
Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
dantleech added a commit that referenced this pull request May 3, 2020
* Validate composer file in CI (#814)

* Goto Class Implementation(s) (#818)

* Find implementations

* Updated docs and plugin

* Fix instanceof bug in WR

* Gh 816 update cl (#819)

* Validate composer file in CI

* Use stable stability

* Fixed import-class menu entry regression #816

Updated CHANGELOG

* Fixes version in changelog

* Fixes import-class attempt #2 #816

* Updates composer.lock

* Fix #816 via. text-document update

* Fix 6.0 typo (#824)

* Bugfix 777 (#825)

* ContextMenuHandler looks for the closest resolvable node

* Updates the handler for worse-reflection changes

* ContextMenuHandler uses InterestingOffsetFinder

* Updates ContextMenuHandlerTest.php

* Updated composer.lock

  jetbrains/phpstorm-stubs 4c8579a5..40d569b2

    [2018-10-05 19:47:32] 98b5d94b sjlehn Add docs for mysqli_result close and free_result
    [2019-09-12 18:26:49] 4cf0ab5b web-flow password_hash can return null
    [2019-09-17 15:47:17] a7554468 <???> Add mysqli extension to the reference Docker image + fix all failures
    [2019-09-17 15:49:43] 8f55cf5a <???> Provide an updated map
    [2019-09-17 16:40:05] 4bd6fa12 <???> Enable all easy to install extensions + fix stubs according to new tests
    [2019-09-17 16:49:02] 0828e8e1 <???> Update libraries
    [2019-09-18 11:59:28] ad0b31e2 <???> Fix parsing of constants with negative value, add missing constants, fix constant values
    [2019-09-18 14:17:14] 49c41666 <???> Fix test for parent interfaces + fix all mongodb interfaces
    [2019-09-18 14:17:37] 42746516 <???> Fix stubs according to new tests
    [2019-09-18 14:39:59] f3a010af <???> Add new extensions + fixes for them
    [2019-09-20 11:31:20] 485c2da9 web-flow Add missing Rdkafka\Message::$len property  Source code that proves that this prope...
    [2019-09-24 16:34:56] 8e545a4c web-flow sha1/md5 default values  value of `$raw_output` is `false` by default    https://gi...
    [2019-09-25 08:06:40] f2912734 zonuexe round(), floor() and ceil() return float or false  These functions return `FALSE` va...
    [2019-10-01 09:37:10] 263786eb web-flow Update stubs for PHP 7.2 (#662)  * WI-37330 Update stubs for PHP 7.2    https://git...
    [2019-10-01 18:46:04] cb148bd0 web-flow Updating default value of intval 2nd parameter  The default of the second parameter...
    [2019-10-02 10:11:55] 08ea0a36 web-flow add @throws to the mongodb  adding @throws to the mongodb/Manager::executeBulkWrite...
    [2019-10-02 13:14:57] ed0b51f9 SvetlanaZem Don't use bugfix number in deprecation tag
    [2019-10-08 12:42:03] a2aef047 andrey-sokolov Non-recurrect true and false constants declaration
    [2019-10-11 20:32:41] e1273310 sjlehn Add since and link tags to session_create_id
    [2019-10-14 10:53:43] 9b3b8398 luzat Fix mb_ereg and mb_eregi reference parameters  Closes #WI-30806.
    [2019-10-14 11:19:43] cdb92e37 <???> Add deprecation for inheritor of `Reflector` interface Fixes WI-48755
    [2019-10-14 13:29:38] 161bbd95 terdia Fixes incorrect signature of preg_split in pcre.php
    [2019-10-14 17:01:15] d1ea83ed <???> Fix indentation
    [2019-10-14 19:57:33] 3ff179fc alister Update - Stubs: Out of date definition for E_ALL.  Closes WI-39737
    [2019-10-14 20:15:19] debaf802 alister DATE_COOKIE-definition-is-incorrect  DateTime::COOKIE is the same value.  Closes WI-...
    [2019-10-14 20:22:50] d9aafe9b alister Value has been fixed.
    [2019-10-14 20:27:40] e6b69b34 alister Value has been fixed, do not mute.
    [2019-10-14 23:10:02] 9cdd45e8 web-flow Fix docblock alignment in SPL_c1
    [2019-10-15 08:58:11] 4df66729 maciejlew Fix SplFileObject::fwrite docs
    [2019-10-15 13:19:09] 84d306ab luzat Replace mixed return types in Core.  Part of WI-32359. Also allows null parameter for ...

  phpactor/code-transform 0cf4f200..f50f1563

    [2019-10-13 16:39:24] 0420e6fb web-flow Use existing version of worse reflection
    [2019-10-14 08:01:54] 69ab60fb dantleech Failing test for finding interesting method call
    [2019-10-14 17:50:10] 3c61923a dantleech Use the original offset if it's interesting

  phpactor/map-resolver 6c467a07..21ef588c

    [2019-08-24 14:04:06] 80ca04e6 dantleech Update LICENSE
    [2019-09-29 10:27:43] c9a8d6fb dantleech Merge required
    [2019-09-29 10:30:30] 21ef588c dantleech Adds test

* Added link to phpactor-mappings package (#826)

* Added link to phpactor-mappings package

* Update vim-plugin.md

* Update vim-plugin.md

* Fix context menu handler callback offset (#827)

The original offset should be used in the callback from the
context menu, not the resolved one.

Actually not sure why it makes a difference if the offset used
is the resolved one, and not the original.

* Vim extract functions handles motions (#823)

* Refactor _selectionStart and _selectionEnd

The goal is to be able to reuse the logic with any mark. So I extracted
the logic inside to private function and refactor the two already
existing.

* Adds a function to extract a constant

* Rework ExtractExpression() to handle motions

* Rework ExtractMethod() to handle motions

* Add keepjumps when using "goto" (#828)

* Add keepjumps when using "goto"

Make a better user experience by preserving je jumplist

* Updates the changelog

* Updates text-document to fix #833 (#834)

* Updates maestro.json

* Explodes package config

* Fix keepjumps for the goto feature (#837)

* Fzf references (#832)

* Adds a function to get the relative path from an absolute path

* Uses fzf to open refernces if available

* Only search within the filename (exclude line and column numbers)

* Makes some optimization

The flow is now:
1) Check if only one reference to the current file -> stop
2) If fzf.vim not available -> use the quickfix list
3) Otherwise format what will be show
    -> More readable
    -> Allow to filter on filename and on the line of the reference
4) Open fzf with preview in fullwidth
    -> Allow to see filename + line with ease
    -> Don't need to see the current buffer when filtering

* Jumps to the position of the reference when opening a file from fzf

* Updates the doc to talk about fzf&bat

* Extract the quickfix building threw zfz in a separate file

* Adds an option to disable the use of fzf to build the quickfix

* Removes trailing spaces in phpactor.vim

* Adds an header in the fzf windows to tell about CTRL-Q

* Removes the header `fzf &fzf.vim` in the doc

* Rework the quickfix feature to include strategies

* Updates the doc after the feedbacks

* Move option definition to phpactor.vim (#839)

* Updated to new maestro schema

* Fix for #841 (#842)

* Refactored JSONs to make version a variable

* bugfix: Worse Reflection - key resolves to unknown fixes #841

* Unresolvable classes import #2 (#847)

* Import Unresolvable Classes

Refactoring to import all unresolvable classes

* Updates composer lock

* Adds doc and rename to => missing classes

* Add closing underscore

* Updates lock

* Revert erronous changes to configs

* Always use inputlist strategy for collections

* Moves decision to use inputlist strategy to dedicated function

* Composer update (#849)

* Fixed maestro package configurations

* Updates composer.lock

* Updated composer

* Updated CHANGELOG

* Support PHP 7.4 Property Types (#854)

* Updates code-builder (#863)

* Handle templates by php version (#869)

* Reorder the template paths

Reorder the templates path by priority so we can override phpactor's
templates.
For information it didn't seem to be the case before, we could add new
templates but not override an existing one.

* Add php.version_id as parameter

* Update CodeTransformExtraExtension to register extra template paths

For each defined template path we will look for directories which name
is a number of 5 digit and consider this name as a PHP version ID.
For each of these directory which corresponds to a version under or
equal to the current PHP version ID we will add them as a loader to
Twig, ordered by ascendant version.

This way we will have something like:
<project_root>/.phpactor/templates
<xdg_config>/phpactor/templates
<app>/templates/70400
<app>/templates/70200
<app>/templates

Which represent the priority in which the templates will be looked for.

Easy to tests, I added `70400/Property.php.twig` in the `code-builder`
packages.
Override the `php.version_id` to 70200 and try to complete a constructor
parameters: the properies added will have a phpdoc block if they had a
type
Do the same thing with `php.verion_id` to 70400: the propery will have a
type and no phpdoc block

* Update CHANGELOG.md

* Move the logic to resolve templates paths in code-transform package

* Use PHP_VERSION format instead of PHP_VERSION_ID

* Update TemplatePathsResolver use statement after moving it into
code-builder

* Rename TemplatePathResolver to PhpVersionPathResolver

* Use phpversion as default

* Updated config

* Updated lock file

* Rename constants and php version key

Co-authored-by: Camille Dejoye <camilledejoye@gmail.com>

* Only import unique names (class import all) (#870)

* Only import unique names (class import all)

* Fix unit tests and update worse reflection

* The undocumented Expand Class (#871)

* Add desciption for Expand Class in doc

* Fix: Expand class missing leading \ for FQN

Definition for fully qualified name should begin with \
See: https://www.php.net/manual/en/language.namespaces.rules.php

* Revert "Fix: Expand class missing leading \ for FQN"

This reverts commit 93d99db.
See #871 (review)

* Fix typo

* Make the sentences more acceptable

* Integrates the code transform "style fixer" / sanitizer. (#862)

* Integrate fixer PR

* Adds smoke test for fix code style command

* Updates composer and changelog

* Use new code transform fixer

* Updated changelog

* Updated composer

* Fix plugin expectation

* Added documentation about fixer settings

* Support for generating code with nullable types (#876)

* Improved CS fixer (#878)

* Improved CS fixer

- Better indentation
- Better CS intersection

* Updated test

* Revert style fixer (#880)

* Remove fix code style command

* Revert the style fixer changes

This approach turned out to be too complicated and took far too much
time. Reverting to the previous, more stable, behavior.

* Rebased and updated composer.lock

* Only 1 file is actually affected here

* Revert cs-fixed test change

* Updated composer

* Make FZF / BAT strategies "experimental" (#883)

* Remove FZF strategy and auto detection

Use standard inputlist by default

* Remove quickfix strategy auto-detection

* Remove the documentation

* Re-add the FZF as experimental

* Restructured documentation

* Updated wording

* Change document to not install dev deps

* Added Phpversoin resolver extension (#884)

* [vim-plugin] Catch json_decode errors

* Updated CHANGELOG

removes some features which are now removed

* Preserve original path if available when generating new class (#796)

the ClassNew class can accept either an FQN or a file path, prior to
this fix if it was given a file path, it converted it to a class name,
but then used the class name to convert it back to the file path - which
is not 100% reliable, as it's possible for a class to exist at multiple
locations.

This fix preserves the file location if given.

* Support aliases with complete constructor (#887)

* Support renaming variables from use (#888)

* VIM Plugin Resturcturing and help (#889)

* Updating VIM plugin

* Adds commands and documentation

* Added documentation for mappings

* Removed duplicated doc in MD file

* Use setting reference

* Updated vimdoc

* Removed functions from autoload

* Reverted deletion of plugin functions

* Adding explicit completion docs

* Removes TOC for plugin as there isn't much doc left

* Moved vim tests

* Added CHANGELOG

* Added documentation on generating the vimdoc

* Use wildcard to run vim tests

* Exit fzf immediatley with no result (#895)

it also removes syntax error that revealed after running with '--exit-0'

* Allow to reuse open window when go to definition (#893)

* Allow to reuse open window when go to definition

* Add help text

* Do not use <SID> without a necessity

* Updated doc and changelog

* Add the autogenerated disclaimer

* Stable Context Menu Shortcuts (#897)

* Bump rpc extension version

* Refactored menu

* Bumps minimum version to 7.2

* Refactored handler to use richer model

* Adds stable shortcuts

* Remove 7.1 from travis

* Fix cs:

* Use stable version

* Updateed changelog

* Add shortcut at end if not present in label

* Make fromArray static

* Remove unnecessary variable

* Added comment about empty keyMap check

* Updated composer lock

* Fix force reload behavior with useOpenWindow

* Remove conflict markers and duplicated key (#903)

* Goto type (#906)

* Add exit codes to commands but stay on SF console 4

* Add vader for goto type

* Use commands instead of calls in docs

* Update composer

* Fix tests

* Adds goto_type context menu shortcut

* Fix: Goto type not definition

* Update refactorings.md (#900)

* Fix "VIM Plugin" example mappings and add missing command definitions (#907)

* [Vim] Fix typo, "phpactor#Naviagate()" -> "phpactor#Navigate()"

* [Vim] Added command definition for "PhpactorTransform"

* [Vim] Adjustments related to vim mapping

- Command mapping contains `()`, so fix it.
- `PhpactorImportAllClasses` command does not exist and has been removed from the mapping
- Changed to map only php filetype

* [VIM] Mapping adjustment

- Added `<buffer>` mapping
- Added `:PhpactorImportMissingClasses` mapping

* Updated mappings (#908)

* Updated mappings

* Use line continuations to keep mappings < 80 cols

* Updated to include cucumber mappings

* Specify args for install and remove extension commands

* Update documentation to use command rather than function

Fixes #927

* Fix #926 (#928)

* Add worse reflectio TTL cache

* Determine the current workspace directory (#923)

* Determine the current workspace directory

* Added '.phpactor.json', '.phpactor.yml' to  g:phpactorProjectRootPatterns

* Remove redundant global variable settings

that came from the moment when they was not set in ftplugin

* Fixed set to fallback

when detected workspace dir is one of global root directories.

* Always include '/' in g:phpactorGlobalRootPatterns

* Rename variable

* Split pattern matching to a separate function

* Update doc

* Remove redundant let

* Revert it: try to get more verbose test result

* Change composer version to pass validation

* Try to fix output from vader tests

* Revert "Try to fix output from vader tests"

This reverts commit 199586a.

* Resolve path when the buffer has no associated file

* Do not add prefix to absolute path to non-existing file

* Revert changes in dependencies

* Add vimdoc

* Updated CHANGELOG

* Misc fixes (#932)

* Fix issue with duplications (class-to-file)

* Updated CHANGELOG

* Update CHANGELOG.md

* Make travis-vimrc CWD-independent (#933)

Allow run test-like instance
from directories other than /phpactor
inside CI docker container

* Updated LSP documentation

* Updated coc doc

* Integrate consolidated completion extension (#935)

* Integrate consolidated completion extension

* Require 7.3 and the language server

* Ignore completion extension from deps tests for now

* Update completion

* Use 0.4 for completion version

* Revert previous package consolidation (#938)

* Add package structure ADR and integrate the language-server ext.

* Remove bundled extensions from exts to test

* Reverts previous package changes

* Rejected ADR

* Bump test-utils

* Update doc/adr/0001-package-structure-macro-packages.md

Co-Authored-By: Grégoire Paris <postmaster@greg0ire.fr>

* Fxed spelling mistkes

Co-authored-by: Grégoire Paris <postmaster@greg0ire.fr>

* Corrected spelling mistakes in ADR

* Include indexer

* Include reference finder and indexer

* Remove bundled and removed extensions

* Include latest text-document update and changelog (#940)

* Language Server Improvements (#945)

* Update language server

* Updated composer again

* Force all errors to stderr rather than stdout

* Language Server Update #2 (#949)

* Language Server Update #2

* Use correct reference

* Updates composer

* Use macro repository for language server (#950)

* Use macro repository for language server

* Updated ADR

* Include LS WorseReflection extension

Properly extract the worse reflection source locator

* Renamed indexer extension + moved indexer LSP handler to LSP ext (#956)

* Update 0002-language-server-package-structure.md

* Language server Changes (#957)

* Add indexer extension

* Updates composer

* Fix index runtimeexfeption

* De-duple completion and fix fswatch (#958)

* De-duple completion and fix fswatch

* Dedupes also by matching short desc + add limit config

* Update deps to fix tests

* Updated composer (#962)

dantleech/what-changed: 5 updated

  phpactor/amp-fswatch 259d11a1..040b0c32

    [2020-04-14 07:55:00] c18b5e6f dantleech Use ctime rather than mtime  Use ctime (inode status change time) rather than modi...
    [2020-04-14 08:15:24] 040b0c32 dantleech Show PID in polling log messages

  phpactor/indexer-extension c3786003..824a7094

    [2020-04-14 08:31:16] 824a7094 dantleech Use ctime in index

  phpactor/language-server dbc11faf..35738182

    [2020-04-14 08:02:10] 8f0c6cb5 dantleech Include PID in status message
    [2020-04-14 09:07:24] 93c9c4f5 dantleech Add support to stop service
    [2020-04-14 09:21:37] 2830c4e1 dantleech Support starting and stopping services
    [2020-04-14 09:23:48] 93825050 dantleech Fix typos
    [2020-04-14 09:39:18] 505ebd31 dantleech Adds service handler
    [2020-04-14 09:56:02] 0c4626c3 dantleech Adds test for service handler
    [2020-04-14 09:56:38] 361b6915 dantleech Applies CS fixes
    [2020-04-14 10:01:50] 35738182 dantleech Updated READMe

  phpactor/language-server-extension 68c3b074..f8c19af2

    [2020-04-14 10:00:54] 9f804886 dantleech Rename service
    [2020-04-14 10:04:38] f8c19af2 dantleech Support indexer cancellation

  phpactor/worse-reflection 4573ff7d..15692d51

    [2020-04-14 08:21:48] 15692d51 dantleech Show more information in chain source locator logging

* Use pretty formatter for verbose console output (#963)

* Add documentation to hover RPC handler

* Add documentation to RPC and LSP hovers

* Put method signature at top of hover RPC text

* Revert additional documentation

It requires user confirmation to close the message window. otherwise
the "hover" information is left while editing continues, which is more
useful.

* Add underline for LSP hover documentation

* Adds language server workspace indexer (#968)

Pro-actively index text documents as they are opened

* Various language-server related updates: (#971)

* Various language-server related updates:

dantleech/what-changed: 10 updated

  phpactor/amp-fswatch 040b0c32..a32e93e3

    [2020-04-19 10:10:35] 2859f97b dantleech Use webmozart glob for pattern matching
    [2020-04-19 10:16:26] 33ded2e6 dantleech Support exclude patterns
    [2020-04-19 13:40:31] a32e93e3 dantleech Adds buffered watcher

  phpactor/completion 5d4e3125..207475b1

    [2020-04-18 20:55:11] d2d67723 dantleech Handle WR not found exception
    [2020-04-18 21:34:28] a723f7cb dantleech Adds interface and trait formatters
    [2020-04-18 21:36:12] 7970725f dantleech Adds interface and trait formatters  CS fixes  Remove dead code
    [2020-04-18 21:52:15] cf8ae314 dantleech Initialize signature information parameters to empty array
    [2020-04-19 05:55:32] 572743c2 dantleech Handle not found reflection exceptions
    [2020-04-17 21:19:21] 9e303cbd elythyr Update WorseDeclaredClassCompletorTest  After updating the dependencies there was tw...
    [2020-04-17 19:14:34] 37a4bd09 elythyr Add an helper to deal with snippets
    [2020-04-17 19:22:05] f2a5f42e elythyr Add snippet to Suggestion
    [2020-04-17 22:24:20] a865be06 elythyr Add a snippet formatter for function & method
    [2020-04-18 15:27:41] 36eb753d elythyr Update WorseFunctionCompletor to use snippets
    [2020-04-18 15:28:06] f626c19b elythyr Update WorseClassMemberCompletor to use snippets
    [2020-04-19 08:58:53] a596b8f6 elythyr Fix a typo
    [2020-04-19 09:00:20] 262fa9f0 elythyr Minor changes required for PlaceholderTest
    [2020-04-19 09:01:32] 54e31917 elythyr Rename $function to $functionLike in FunctionLikeSnippetFormatter
    [2020-04-19 09:03:01] 2702d5f7 elythyr Consistently use sprtinf()
    [2020-04-19 09:11:36] 27f11f34 elythyr Remove snippet test for constructor since it's not handled
    [2020-04-19 09:12:26] def205b0 elythyr Forgot a type hint in FunctionLikeSnippetFormatterTest
    [2020-04-19 11:59:05] 92b405c8 elythyr Refactor FunctionLikeSnippetFormatterTest to use ReflectorBuilder

  phpactor/completion-extension ab15452f..46972d35

    [2020-04-18 15:55:45] 64cdb344 elythyr Register the snippet formatter

  phpactor/completion-worse-extension 3a5ac832..ecbf196b

    [2020-04-18 21:48:43] 90fdb0f3 dantleech Adds interface and trait formatters to extension
    [2020-04-18 15:59:43] 2c668836 elythyr Remove composer.lock and add it to .gitignore  I think it was added by mistake as we...
    [2020-04-18 16:02:49] e16791e5 elythyr Register the FunctionLikeSnippetFormatter
    [2020-04-19 12:16:18] ecbf196b dantleech Drop 7.1/2 support

  phpactor/indexer-extension 0e52ea64..67f7b409

    [2020-04-19 06:56:31] e70f3051 dantleech If name is empty, do not proceed
    [2020-04-19 08:36:07] 3bcd6d5c dantleech Add support for indexing functions
    [2020-04-19 08:41:52] d597019b dantleech UPdate travis badge
    [2020-04-19 08:51:15] 456db5fa dantleech Add test for race condition (stated file doesn't exist)
    [2020-04-19 08:57:17] 3047cf60 dantleech Adds function source locator
    [2020-04-19 09:59:04] 4811810b dantleech Add indexer exclude patterns
    [2020-04-19 10:29:37] dc2a43ee dantleech Support for inclusion / excluion patterns in watcher and builder
    [2020-04-19 10:41:44] 6086471a dantleech Boost SCF min version
    [2020-04-19 10:55:38] 127e073d dantleech Fix incorrect index path
    [2020-04-19 11:19:01] 0fac46a2 dantleech Fix exclude patterns
    [2020-04-19 13:28:31] 67f7b409 dantleech Handle filesystem exception
    [2020-04-19 13:52:13] d747b437 dantleech Add support for buffer time  For inotify watcher this allow...

  phpactor/language-server 5d68a1b8..effc8ec0

    [2020-04-18 20:13:37] be73d75c dantleech Show exception class in exception response
    [2020-04-19 07:03:17] cc5376fe dantleech Imporve handler tester
    [2020-04-19 07:08:17] 61244849 dantleech Add service manager isRunning()
    [2020-04-19 07:16:01] f0a51361 dantleech Handler tester: add accessor for service manager    [2020-04-19 07:23:06] effc8ec0 dantleech Do not reset message stack on each request
  phpactor/language-server-extension 04afcd30..490c78fe
    [2020-04-18 20:48:53] d7b62545 dantleech Handle definition not found #951
    [2020-04-18 22:26:01] e286c021 dantleech Handle type not found
    [2020-04-19 07:28:53] 09b7f414 dantleech Add handler to reindex
    [2020-04-17 13:40:07] f36dd558 elythyr Add Protocol\InsertText to deal with snippets on completion  https://microsoft.githu...
    [2020-04-17 15:17:03] 799e9888 elythyr Support snippets in CompletionHandler
    [2020-04-17 16:52:25] 7eba3816 elythyr Update regex detecting a snippet  https://microsoft.github.io/language-server-protoc...
    [2020-04-18 16:22:34] cefb9da8 elythyr Use the new Suggestion::snippet() instead of creating it ourself  Remove everything ...
    [2020-04-18 16:25:08] b9a6bddb elythyr Add a gitignore
    [2020-04-18 18:28:37] da547e29 elythyr Fix issue with $ for variable  Because I used $suggestion->name() as insertText the ...
    [2020-04-19 09:36:00] 9d660e79 elythyr Register client capabilities as param in the container
    [2020-04-19 11:21:08] f8488652 elythyr Use Invoke::new to create CompletionItem
    [2020-04-19 11:22:21] 23af16c7 elythyr Handle clientCapabilities.textDocument.completion.supportSnippet

  phpactor/source-code-filesystem b1e11fdf..86709b0e

    [2020-04-19 09:26:29] 5d5aa27c dantleech Add support for exclude paths
    [2020-04-19 09:27:20] 989e529d dantleech Support include patterns
    [2020-04-19 09:29:22] 86709b0e dantleech Drop 7.1/2 support

* Fix service name

* Only include PHP files for watcher and fix completion test

* Fix ftplugin (#964)

* Make g:_phpactorCompletionMeta a local script variable

It does not need to be global, since it only used in
autoload/phpactor.vim I made it a variable local to the script
This way it's accessible to all functions inside the file only.

* Move config init to plugin directory

If it's just about initializing global configuration we can (must ?) do
it in the `plugin` directory instead of the ftplugin
The idea is that a global configuraiton is not link to a buffer and
should always be accessible.

I also change the auto command to add a use statement on auto
completion.
I made it a buffer command so that it is not triggerd for all buffers
after opening one php file.
I put it into a group in order to be able to clean everything, just in
case because I'm not sure how vim behave if we change the filetype
manually multiple times.
I made it call a temporary function that will check if the configuration
allow to import a class automatically or not.
I did it like this because I didn't want to change the way the function
currently behave.
I also updated the condition to look for a buffer configuration.
It more in order to show how it works than anything else, since we start
to define commands, mappings and all that on a buffer level we should
also start to let the user the possibility to override our configuration
on a buffer level.

* Rename g:phpactorLoaded to g:loaded_phpactor

This is a recommendation from the vim documentation:
:h write-plugin
Then search for `loaded_`

* Move check for auto import in the function directly

* Updated CHANGELOG

* Fix test expectation

* Updated composer.lock

* improvement: Add phpactor status to :healthcheck (#974)

* StatusHandler can return unformatted details

* phpactor#Status() uses :terminal if available

Could add a configuraiton to allow the user to prevent the use of the
terminal.
But I don't want to end up with a plugin which has so many configuraiton
that you don't even look at them.

* Include phpactor status to :checkhealth

* Support for LSP goto implementation (#979)

* Support for LSP goto implementation

* Fix test expectation in vendor lib

* Updated CHANGELOG

* Updated composer (#984)

* Updated composer

* Render empty when template not found and use tolerant indexer by default

* Enable the LS hover extension

* Fix commands (#965)

* Move generic commands to the plugin directory

These commands should be accessible from any buffer.
If I want to update phpactor I should be able to do it from anywhere.

* Make remaining commands buffer commands

Otherwise the commands will be global and accessible from any buffer as
long as one buffer of `php` filetype has been open.
Which is not the behavior we want.

* Move some commands to be globally accessible

Create class
Expand class
All Gotos

* Update vim doc

* Updated CHANGELOg

* Disable root patterns

This feature doesn't behave as expected, temporarily disabling
until fix is merged

* Skip searching for empty set of root patterns (#988)

* Update composer (#991)

* Updated compoesr.lock (#993)

phpactor/completion 9d23f252..1cf7ee4c

    [2020-04-30 20:31:19] 1cf7ee4c dantleech Handle error from variable completion helper

  phpactor/language-server 47e2ecb3..d710981a

    [2020-04-30 19:40:33] 35cb5701 dantleech Add test for not overwriting newer document
    [2020-04-30 20:09:51] 7ca49aab dantleech Consider document versions when updating workspace
    [2020-04-30 20:22:33] e8e79563 dantleech Added logger to Workspace
    [2020-05-01 09:44:20] fef2d314 dantleech Do not cast request/response ID to string
    [2020-05-01 09:45:29] 6c89c230 dantleech Fix type declatation
    [2020-05-01 10:02:38] d710981a dantleech Initialize codeAction provide to false  Makes Neovim happy

  phpactor/language-server-extension 14026a42..c25fa29a

    [2020-04-30 20:26:09] 74ad20bc dantleech Inject logger into workspace
    [2020-04-30 20:36:43] c25fa29a dantleech Render constant in properties for hover

* Restructured Text Documentation (#995)

* Converted all docs to RST

* Removed dead file

* Refactoring documentation

* Updated doc structure to match existing

* Update Makefile

* Refactor to use contents:: directive

* Restructuring

* Assign master doc for RTD

* Refactor home page

* Add links

* Add python requirements

* Try and lint docs

* Try and parallize jobs

* Fix requirement

* Disable duplicate test

* Update README.md

* Update README.md

* Updated links in documentation

* Update Docs with LSP Features (#997)

* Expanded LSP documentation

Add LSP support list

Add Sphinx watcher

* Removed unnecessaries

* Fail on Warning

* Fix references

* Fix order

* Use cross with same bytesize as check

* Doc lsp (#998)

* Fix LSP doc

* Add doc for diagnostics

* Fix responsive mode

* Updated health check text

* Updated indexer and getting started

* Update doc to use tabs

* Make target for Vimdoc (#1000)

* Add make target to build vimdoc

* Add setuptools to deps

* Run make docs

* Fix reference

* Do not use SSH for git repo

* Install vimdoc bin

* Check for file not dir

* Fix makefile

* Install vimdoc in userspace

* Revert project root (#923) (#1001)

Feature doesn't work as expected as it will take vendor
directories as project roots.

* Fix regression in generate accessor behavior (#1002)

* Updated composer

  phpactor/language-server d710981a..ee8a38be

    [2020-05-01 13:31:25] 034fe02c elythyr Remove null values from responses  We had issues when the response contains null values. They aren't always handled properly by the clien...

* Prepare 0.15.0 release

Co-authored-by: Chin Leung <hello@chinleung.com>
Co-authored-by: Camille Dejoye <camilledejoye@gmail.com>
Co-authored-by: Qz <38932402+QzCurious@users.noreply.github.com>
Co-authored-by: Tomasz N <przepompownia@users.noreply.github.com>
Co-authored-by: Den Girnyk <great.antique@gmail.com>
Co-authored-by: yaegassy <yaegassy@users.noreply.github.com>
Co-authored-by: Grégoire Paris <postmaster@greg0ire.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants