Repository navigation
Update Docs with LSP Features #997
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
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c8d9464
Expanded LSP documentation
dantleech 58cf127
Removed unnecessaries
dantleech 9693cee
Fail on Warning
dantleech 8a37b74
Fix references
dantleech 2d7ca21
Fix order
dantleech e49a7e4
Use cross with same bytesize as check
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ | |
| /.phpactor/* | ||
|
|
||
| # docs | ||
| /.couscous | ||
| /doc/_build | ||
|
|
||
| # php-cs-fixer | ||
| /.php_cs.cache | ||
|
|
||
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,6 @@ | ||
| #!/usr/bin/env bash | ||
| make html | ||
| while RES=$(inotifywait -e modify doc -r); do | ||
| echo $RES | ||
| make html | ||
| done |
This file was deleted.
Oops, something went wrong.
Empty file.
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,16 +1,9 @@ | ||
| {% if theme_logo %} | ||
| <p class="logo"> | ||
| <a href="{{ pathto(master_doc) }}"> | ||
| <a href="{{ pathto('index') }}"> | ||
| <img class="logo" src="{{ pathto('_static/' ~ theme_logo, 1) }}" alt="Logo"/> | ||
| {% if theme_logo_name|lower == 'true' %} | ||
| {% endif %} | ||
| </a> | ||
| <h2 class="logo logo-name">{{ project }}</h2> | ||
| </p> | ||
| {% else %} | ||
| <h1 class="logo"><a href="{{ pathto(master_doc) }}">{{ project }}</a></h1> | ||
| {% endif %} | ||
|
|
||
| {% if theme_description %} | ||
| <p class="blurb">{{ theme_description }}</p> | ||
| {% endif %} |
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,3 +1,4 @@ | ||
| <hr/> | ||
| {{ toctree(collapse=False,includehidden=False) }} | ||
| {% if theme_extra_nav_links %} | ||
| <hr /> | ||
|
|
||
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,20 @@ | ||
| {# | ||
| basic/searchbox.html | ||
| ~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Sphinx sidebar template: quick search box. | ||
|
|
||
| :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. | ||
| :license: BSD, see LICENSE for details. | ||
| #} | ||
| {%- if pagename != "search" and builder != "singlehtml" %} | ||
| <div id="searchbox" style="display: none" role="search"> | ||
| <div class="searchformwrapper"> | ||
| <form class="search" action="{{ pathto('search') }}" method="get"> | ||
| <input placeholder="Search..." type="text" name="q" aria-labelledby="searchlabel" /> | ||
| <input type="submit" value="{{ _('Go') }}" /> | ||
| </form> | ||
| </div> | ||
| </div> | ||
| <script type="text/javascript">$('#searchbox').show(0);</script> | ||
| {%- endif %} |
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,19 @@ | ||
| Contents | ||
| ======== | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| usage | ||
| reference | ||
| extensions | ||
| other | ||
|
|
||
| .. toctree:: | ||
| :hidden: | ||
|
|
||
| index | ||
| vim | ||
| adr | ||
| integrations/drupal8 | ||
| screenshots |
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,12 @@ | ||
| Language Server | ||
| =============== | ||
|
|
||
| See :ref:`language_server` for getting started instructions. | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| lsp/clients | ||
| lsp/watcher | ||
| lsp/running | ||
| lsp/support |
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,5 +1,8 @@ | ||
| Clients | ||
| ======= | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
| :maxdepth: 2 | ||
|
|
||
| vim | ||
| sublime | ||
|
|
||
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,35 @@ | ||
| Manually Running the Server | ||
| --------------------------- | ||
|
|
||
| Typically you should never need to run the Language Server yourself, the | ||
| following methods are useful for development. | ||
|
|
||
| STDIO | ||
| ~~~~~ | ||
|
|
||
| STDIO is typically used by clients and it the default mode. | ||
|
|
||
| .. code:: bash | ||
|
|
||
| $ phpactor language-server | ||
|
|
||
| This is the method you should use when configuring an LSP client. | ||
|
|
||
| Run with TCP Server | ||
| ~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| The TCP server is useful for debugging: | ||
|
|
||
| .. code:: bash | ||
|
|
||
| $ phpactor language-server --address=127.0.0.1 -vvv | ||
|
|
||
| You should see something like: | ||
|
|
||
| :: | ||
|
|
||
| Starting TCP server, use -vvv for verbose output | ||
| [2018-09-30 17:15:25] phpactor.INFO: listening on address 127.0.0.1:8888 [] [] | ||
| [2018-09-30 17:15:25] phpactor.INFO: starting language server with pid: 9286 [] [] | ||
|
|
||
| .. _Language Server Protocol: https://microsoft.github.io/language-server-protocol/specification |
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,3 +1,5 @@ | ||
| .. _lsp_client_sublime: | ||
|
|
||
| Sublime Text | ||
| ============ | ||
|
|
||
|
|
||
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,54 @@ | ||
| LSP Support | ||
| =========== | ||
|
|
||
| See the `Language Server Specification`_ for details. | ||
|
|
||
| +-------------------------+---+-------------------------------------+ | ||
| | Feature | | | | ||
| +=========================+===+=====================================+ | ||
| | Completion | ✔ | See :ref:`completion` | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Completion Resolve | ✘ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Hover | ✔ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Signature Help | ✔ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Goto Declaration | ✔ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Goto Type | ✔ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Goto Implementation | ✔ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Find References | ✘ | Supported by RPC [#rpc]_ [#nav]_ | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Document Highlight | ✘ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Document Symbol | ✘ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Code Action | ✘ | Supported by RPC [#rpc]_ [#code]_ | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Code Lens | ✘ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Document Link | ✘ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Document Color | ✘ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Color Presentation | ✘ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Formatting | ✘ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Range Formatting | ✘ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Rename | ✘ | Supported by RPC [#rpc]_ [#rename]_ | | ||
| +-------------------------+---+-------------------------------------+ | ||
| | Folding/Selection Range | ✘ | | | ||
| +-------------------------+---+-------------------------------------+ | ||
|
|
||
| .. _Language Server Specification: https://microsoft.github.io/language-server-protocol/specification | ||
|
|
||
| .. [#rpc] Available through RPC (i.e. non-LSP client) LSP support should be added soon. | ||
| .. [#code] Code actions translate to :ref:`refactoring` actions in Phpactor, and should be available in the next release. | ||
| added soon. | ||
| .. [#nav] RPC supports :ref:`navigation_class_references` and :ref:`navigation_class_member_references` | ||
| .. [#rename] RPC supports :ref:`refactoring_rename_variable`, :ref:`refactoring_rename_class`, :ref:`refactoring_rename_member`, |
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,6 +1,8 @@ | ||
| VIM / NeoVim | ||
| ============ | ||
|
|
||
| .. _lsp_client_vim_coc: | ||
|
|
||
| CoC | ||
| --- | ||
|
|
||
|
|
||
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,44 @@ | ||
| Watcher | ||
| ======= | ||
|
|
||
| When the language server starts Phpactor will index all the PHP files in your | ||
| working directory, and then *watch* for changes. | ||
|
|
||
| The type of watcher used depends on your system. Currently the following | ||
| watchers will be used, in order of priority: | ||
|
|
||
| 1. ``inotifywait``: **Linux** only, react immediately[1] to file changes. | ||
| 2. ``find``: **Linux/Mac/POSIX** Poll the system for changes every 5 seconds. | ||
| 3. ``php``: **Any system**: Poll system using PHP (slow) every 5 seconds. | ||
|
|
||
| To contribute to the available watchers see `amp-fswatch | ||
| <https://github.com/phpactor/amp-fswatch>`_. | ||
|
|
||
| If you want to find out which watcher your system is using, enable _`logging`. | ||
|
|
||
| Troubleshooting | ||
| --------------- | ||
|
|
||
| Inotify: Why isn't ``inotifywait`` used when I'm on Linux? | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| It may not be installed, on Debian/Ubuntu | ||
|
|
||
| .. code:: sh | ||
|
|
||
| $ sudo apt-get install inotify-tools | ||
|
|
||
| Inotify: ``inotify`` limit reached | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| The default number of watchers is quite low by default, try increasing the | ||
| number of watchers: | ||
|
|
||
| .. code:: sh | ||
|
|
||
| $ sudo sysctl fs.inotify.max_user_watches=100000 | ||
|
|
||
| Note this still may not be sufficient, so increase as necessary, make the | ||
| change permanent by writing to ``/etc/sysctl.conf`` | ||
|
|
||
| .. _Watchman: https://facebook.github.io/watchman/ |
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,3 +1,5 @@ | ||
| .. _rpc_protocol: | ||
|
|
||
| RPC Protocol | ||
| ============ | ||
|
|
||
|
|
||
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 |
|---|---|---|
|
|
@@ -6,3 +6,4 @@ Reference | |
| :glob: | ||
|
|
||
| reference/* | ||
| language-server | ||
Oops, something went wrong.
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.
The index has the "home" page on it, the contents (TOC) live a separate life.