Skip to content
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

I encountered an issue where code completion becomes abnormal after Solargraph receives the workspace/didChangeWorkspaceFolders request. #668

Open
bluesaiz opened this issue Jun 15, 2023 · 0 comments

Comments

@bluesaiz
Copy link

Currently, I am facing an issue where if solargraph receive a workspace/didChangeWorkspaceFolders request with the same folder in both the "added" and "removed" fields, such as in the following message:

jsonCopy code{
    "jsonrpc": "2.0",
    "method": "workspace/didChangeWorkspaceFolders",
    "params": {
        "event": {
            "added": [
                {
                    "uri": "file:///home/name/solargraph_test",
                    "name": "workpath"
                }
            ],
            "removed": [
                {
                    "uri": "file:///home/name/solargraph_test",
                    "name": "workpath"
                }
            ]
        }
    }
}

I found the current code handling is problematic:

def process
    add_folders
    remove_folders  
end

image

maybe changed to:

def process
    remove_folders  
    add_folders
end

in order to handle more cases.

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

No branches or pull requests

1 participant