Skip to content

Use language server to populate webviews #101

Open
@bentsherman

Description

@bentsherman

The new Nextflow webview includes sections for Workflows and Processes. They are currently populated by scanning the workspace for Nextflow scripts.

To ensure a consistent user experience with the rest of the editor UI, these views should use the language server as much as possible rather than going through the filesystem.

The required information is similar to "call hierarchy" in the LSP, but we'll likely need a custom language server command e.g. nextflow.server.workflowTree:

  1. Get the list of all Nextflow scripts in the workspace
  2. Get the list of process and workflow definitions for each script
  3. Get the list of process/workflow calls for each workflow definition
  4. Build workflow tree (can be done by server or client)

The top-level nodes of the tree should be the entry workflows, then go from there.

Step (3) might be expensive for a large pipeline, so we might need to lazy load these. In this case it can be enough to simply retrieve the entry workflows and use the callHierarchy LSP request to lazy load callees.

The "Workflows" and "Processes" views can probably be combined into a single view with the tree view / list view variants. Then we can also show nf-tests for workflows.

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