Skip to content

Track open files in server #619

@MichaReiser

Description

@MichaReiser

astral-sh/ruff#18482 starts purging AST nodes after checking a file is complete. However, purging the AST is undesired for open files in the server because providing completions or any other AST based information then requires reparsing the file.

The Project already has infrastructure to track the open files but we aren't using it in the LSP today. We should extend the LSP to call open_file and close_file in its notification handlers.

CC: @ibraheemdev maybe a follow up task to your PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedContributions especially welcomeserverRelated to the LSP server

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions