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

fix: check existing_client support workspaceFolder #3452

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

glepnir
Copy link
Member

@glepnir glepnir commented Nov 25, 2024

if existing_client does not support workpaceFolder should spawn a new server instance

if existing_client does not support workpaceFolder
should spawn a new server instance
@lithammer
Copy link
Collaborator

This looks like something that should be upstreamed to core?

@glepnir
Copy link
Member Author

glepnir commented Nov 25, 2024

reuse_client just a condition check in the upstream. Maybe other possibilities are considered as public API. Not sure if coding check workpaceFolder in core is appropriate. But we need it here because it is compatible with release version

function lsp.start(config, opts)
  opts = opts or {}
  local reuse_client = opts.reuse_client or reuse_client_default
  local bufnr = resolve_bufnr(opts.bufnr)

  for _, client in pairs(all_clients) do
    if reuse_client(client, config) then
      if lsp.buf_attach_client(bufnr, client.id) then

@glepnir glepnir merged commit fe88ead into neovim:master Nov 26, 2024
11 checks passed
@glepnir glepnir deleted the folders branch November 26, 2024 06:19
@glepnir glepnir restored the folders branch November 26, 2024 11:02
@glepnir glepnir deleted the folders branch November 26, 2024 11:02
glepnir added a commit that referenced this pull request Nov 26, 2024
glepnir added a commit that referenced this pull request Nov 26, 2024
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