lspcontainers.nvim icon indicating copy to clipboard operation
lspcontainers.nvim copied to clipboard

feat(runtime): add setup option for agnostic runtime support

Open jgero opened this issue 2 years ago • 2 comments

By moving the runtime to a config option which is set during setup the runtime parameter is not necessary anymore for each LSP cmd.

Closes #84

Also rename the global configuration variable to something plugin related to make it obvious which plugin is responsible for that variable and to avoid possible name collisions.

jgero avatar Jun 25 '22 12:06 jgero

Should the networking mode be also contained as an setup variable? When we then create the docker/podman command the network parameter could just be a boolean to switch between none and the mode passed during setup.

@erikreinert

Setup would then look something like:

require("lspcontianers").setup({runtime = "podman", network = "slirp4netns"})

And LSP config:

require("lspconfig").gopls.setup({
  on_attach = on_attach,
  capabilities = capabilities,
  cmd = require("lspcontainers").command("gopls", {wantNetwork = true})
})

jgero avatar Jun 25 '22 12:06 jgero

To be included in #92

erikreinert avatar Nov 07 '22 20:11 erikreinert