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

Only re-use the same server for multiple workspaces if the server supports it #2324

Conversation

exactly-one-kas
Copy link

rust-analyzer stopped working for multiple workspaces, this starts multiple processes for it again

@xiantang
Copy link
Contributor

xiantang commented Dec 19, 2022

seems related to #2287

@xiantang
Copy link
Contributor

rust-analyzer stopped working for multiple workspaces, this starts multiple processes for it again

gopls stoped working also

@glepnir
Copy link
Member

glepnir commented Dec 20, 2022

I don't think so. You can understand it as inserting multiple projects into the workspace instead of having multiple workspaces field.

rust-analyzer stopped working for multiple workspaces, this starts multiple processes for it again

maybe workspace/didChange method not send or something else.

@xiantang
Copy link
Contributor

xiantang commented Dec 20, 2022

I don't think so. You can understand it as inserting multiple projects into the workspace instead of having multiple workspaces field.

rust-analyzer stopped working for multiple workspaces, this starts multiple processes for it again

maybe workspace/didChange method not send or something else.

local params = lsp.util.make_workspace_params(
          { { uri = vim.uri_from_fname(root_dir), name = root_dir } },
          { {} }
        )
        if not client.workspace_folders then
          client.workspace_folders = {}
        end
        table.insert(client.workspace_folders, params.event.added[1])
        return client.id

I found that u just create a params and did not notify to LSP

@glepnir
Copy link
Member

glepnir commented Dec 20, 2022

good catch there need trigger didChange. so problem should be there.

@glepnir
Copy link
Member

glepnir commented Dec 20, 2022

because I got covid-19 so reset some days then I stop working on neovim .

@xiantang
Copy link
Contributor

because I got covid-19 so reset some days then I stop working on neovim .

let me try to fix this issue, have u bought some painkillers?

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 this pull request may close these issues.

3 participants