Skip to content

[Bug] None-ls plugin trying to spawn multiple instances of the none-ls language server #328

Description

@foxyseta

I am unable to use the bug report issue template, as I am having trouble reproducing my problem on a minimal config.

Steps to reproduce

This happens when I start neovim on some files.

Actual behaviour

On startup, I get the following error message:

[null-ls] failed to start null-ls client with config: {
  cmd = <function 1>,
  filetypes = { "fish", "gitcommit", "yaml", "lua", "luau", "typst", "typ", "text", "org", "markdown" },
  flags = {
    debounce_text_changes = 250
  },
  name = "null-ls",
  on_attach = <function 2>,
  on_exit = <function 3>,
  on_init = <function 4>,
  root_dir = "/home/foxy/desktop/phd/research/den-sem-ho-lang"
}

Still, the LS is correctly attached to my buffer. So my guess is that the plugin is attempting to spawn multiple LS instances for the same buffer.

Proposed solution

Before this invocation

id = lsp.start(config)
,

would it be possible to check if none-ls is already attached to the buffer? Only if it is not, we should try to spawn a new instance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions