Skip to content

Add option for lightweight startup #107

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

Closed
bentsherman opened this issue Mar 23, 2025 · 0 comments · Fixed by #110
Closed

Add option for lightweight startup #107

bentsherman opened this issue Mar 23, 2025 · 0 comments · Fixed by #110

Comments

@bentsherman
Copy link
Member

Currently the language server initializes a workspace by recursively scanning the root directory and parsing all scripts and config files. Even with parallel compilation, this can lead to a startup time on the order of ~10 seconds for a large project like nf-core/rnaseq.

It would be nice to have the option for a more lightweight startup. For example, when I open a file, just parse that file and its includes. Maybe you still do the full scan afterwards, because at that point it shouldn't block the current file from having code intelligence.

We could tie this to the "Extended completions" setting. This is the main reason why I need to scan the entire workspace, so that I can provide completions for external definitions. The full scan also allows you to see all errors across the workspace, but if I open the main script in this lightweight mode, I will get the same errors I would get when running it.

Another question is how to handle config files vs scripts. If I open a script in lightweight mode, should the language server automatically load nextflow.config in the same directory? That would be consistent with run, but also, the user can specify arbitrary configs at run-time, so we can't really guarantee "consistency" here anyway. As a first iteration, maybe better to not try to be smart here.

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 a pull request may close this issue.

1 participant