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
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions doc/lsp/support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ See the `Language Server Specification`_ for details.
+-------------------------+---+-------------------------------------+
| Document Symbol | ✔ | For structural elements |
+-------------------------+---+-------------------------------------+
| Selection Range | ✔ | |
+-------------------------+---+-------------------------------------+
| Code Action | ✘ | Supported by RPC [#rpc]_ [#code]_ |
+-------------------------+---+-------------------------------------+
| Code Lens | ✘ | |
Expand Down
41 changes: 38 additions & 3 deletions doc/lsp/vim.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,43 @@ Client Guides
}
}

See `coc-phpactor<https://github.com/phpactor/coc-phpactor>` for more
I am using the following CoC key bindings and configuration:

::

" Select range based on AST
nmap <silent><Leader>r <Plug>(coc-range-select)
xmap <silent><Leader>r <Plug>(coc-range-select)

" Navigations
nmap <Leader>o <Plug>(coc-definition)
nmap <Leader>O <Plug>(coc-type-definition)
nmap <Leader>I <Plug>(coc-implementation)
nmap <Leader>R <Plug>(coc-references)

" Hover
nmap K :call <SID>show_documentation()<CR>
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction

" Text objects for functions and classes (uses document symbol provider)
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)
autocmd CursorHold * silent call CocActionAsync('highlight')

See `coc-phpactor <https://github.com/phpactor/coc-phpactor>`_ for more
information.

.. tab:: Autozimu
Expand All @@ -74,8 +110,7 @@ Client Guides
\ 'php': [ 'phpactor', 'server:start', '--stdio']
\}

See the `github
repository <https://github.com/autozimu/LanguageClient-neovim>`__ for
See the `github repository <https://github.com/autozimu/LanguageClient-neovim>`_ for
more details.

Troubleshooting
Expand Down
60 changes: 23 additions & 37 deletions doc/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -784,19 +784,16 @@ LanguageServerExtension
-----------------------


.. _param_language_server.client_capabilities:


``language_server.client_capabilities``
"""""""""""""""""""""""""""""""""""""""
.. _param_language_server.catch_errors:


``language_server.catch_errors``
""""""""""""""""""""""""""""""""


For internal use only: will contain the capabilities of the connected language server client


**Default**: ``[]``
**Default**: ``true``


.. _param_language_server.enable_workspace:
Expand Down Expand Up @@ -829,6 +826,21 @@ Phpactor parameters (config) that apply only to the language server session
**Default**: ``[]``


.. _param_language_server.method_alias_map:


``language_server.method_alias_map``
""""""""""""""""""""""""""""""""""""




Allow method names to be re-mapped. Useful for maintaining backwards compatibility


**Default**: ``[]``


.. _LanguageServerCompletionExtension:


Expand Down Expand Up @@ -1015,25 +1027,6 @@ Recurse over class implementations to resolve all class implementations (not jus
**Default**: ``true``


.. _BehatExtension:


BehatExtension
--------------


.. _param_behat.config_path:


``behat.config_path``
"""""""""""""""""""""




**Default**: ``"%project_root%\/behat.yml"``


.. _LanguageServerPhpstanExtension:


Expand All @@ -1053,21 +1046,14 @@ LanguageServerPhpstanExtension
**Default**: ``"%project_root%\/vendor\/bin\/phpstan"``


.. _PhpSpecExtension:


PhpSpecExtension
----------------

.. _param_phpstan.level:

.. _param_phpspec.spec_prefix:


``phpspec.spec_prefix``
"""""""""""""""""""""""
``phpstan.level``
"""""""""""""""""




**Default**: ``"spec"``
**Default**: ``null``

2 changes: 2 additions & 0 deletions lib/Phpactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Phpactor\Extension\LanguageServerIndexer\LanguageServerIndexerExtension;
use Phpactor\Extension\LanguageServerReferenceFinder\LanguageServerReferenceFinderExtension;
use Phpactor\Extension\LanguageServerSymbolProvider\LanguageServerSymbolProviderExtension;
use Phpactor\Extension\LanguageServerSelectionRange\LanguageServerSelectionRangeExtension;
use Phpactor\Extension\LanguageServerWorseReflection\LanguageServerWorseReflectionExtension;
use Phpactor\Extension\LanguageServer\LanguageServerExtension;
use Phpactor\Indexer\Extension\IndexerExtension;
Expand Down Expand Up @@ -124,6 +125,7 @@ public static function boot(InputInterface $input, string $vendorDir): Container
LanguageServerBridgeExtension::class,
LanguageServerCodeTransformExtension::class,
LanguageServerSymbolProviderExtension::class,
LanguageServerSelectionRangeExtension::class,
IndexerExtension::class,
];

Expand Down