Skip to content

Language Server: Indexer #917

Closed
Closed

Description

@dantleech

Automatically start the Indexer and update files as they are modified.

The indexer provides the following capabilities to Phpactor:

  • Jump to implementations (:PhpactorGotoImplementations)
  • Working with legacy PHP projects (e.g. without composer)

WIP Here: https://github.com/phpactor/language-server-workspace-query-extension (note will probably move it to the workspace-query extension).

  • Automatically start indexing service (added concept services to the Phpactor language server)
  • Linux: Wait for file modifications using inotify *
  • Mac: Wait for file modifications using fswatch (??)
  • POSIX: Find watcher
  • Report progress to client Support WorkDoneProgress messages neoclide/coc.nvim#1582 - cannot get this to work currently. gitter link (have added manual notifications ... )
  • Allow selection of active indexers
  • Brute force indexer (to work, f.e. with windows, or when no other method can be used)
  • Initially I thought we could update based on editor changes - but as Phpactor does lots of things ex-editor this would not be sufficient.

tail: inotify resources exhausted
tail: inotify cannot be used, reverting to polling

☝️ potentially the reason the language server stops working (seen in a tail process which couldn't use inotify anymore)

Activity

  1. expipiplus1 commented on Mar 16, 2020

    @expipiplus1

    @dantleech Please update this issue if you get the progress reporting working! I'm curious about how it works with coc.nvim. FWIW it worked automatically for haskell-ide-engine with the coc extension https://github.com/expipiplus1/vscode-hie-server

    From the talk on neoclide/coc.nvim#1582 I was surprised that it ended up working though and would like to be unsurprised :)

  2. dantleech commented on Mar 29, 2020

    @dantleech
    CollaboratorAuthor

    The indexer now uses https://github.com/phpactor/amp-fswatch to monitor for changes, it uses inotifywait (Linux) or fallsack to POSIX find for polling. There is also support for fswatch which is cross-platform, but it doesn't work superbly at the moment.

  3. dantleech commented on Apr 12, 2020

    @dantleech
    CollaboratorAuthor

    @expipiplus1 I could not get progress working by sending a window/workDoneProgress/create method from the client.

    Another thing to try is to use the workDoneToken provided by the client, f.e., with the initialize call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions