Skip to content

Debounce RLS invocations to make it less annoying #271

Open
@Boscop

Description

@Boscop

For small projects, RLS calls seem to return almost immediately, but for my current project which currently has ~16000 lines (and transitively depends on 247 crates), whenever I type some Rust code (with RLS enabled), after a few seconds of typing something, RLS shows a warning/error about what I typed like 10 seconds ago which I already fixed (and which wasn't even an error, just an unfinished line), which is very distracting / annoying.

(And on top of that, rls.exe uses 25% CPU all the time (even when I haven't typed anything in several minutes) (making my laptop's fan spin which is annoying, too), but Rust-Enhanced can't do much about that, I guess.)

I think this could be improved by only asking RLS for a check when there was no typing for at least 2 seconds, otherwise it always complains about syntax stuff that wasn't even an error to begin with, just an unfinished code line.

Also, it seems to show some warnings on top that are related to unused functions in other modules etc.
How can I ignore those warnings like dead_code, unused_imports (for RLS only)?

And then, how to make RLS/Rust-Enhanced show the warnings/errors related to the current file at the top of the list?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rlsArea: Rust Language Server

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions