Skip to content

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

Draft
jgero wants to merge 1 commit intolspcontainers:mainfrom
jgero:runtime-config
Draft

feat(runtime): add setup option for agnostic runtime support#85
jgero wants to merge 1 commit intolspcontainers:mainfrom
jgero:runtime-config

Conversation

@jgero
Copy link
Contributor

@jgero jgero commented Jun 25, 2022

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
Copy link
Contributor Author

jgero commented Jun 25, 2022

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})
})

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

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.
@erikreinert
Copy link
Contributor

To be included in #92

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.

Agnostic Runtime Support

2 participants