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

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

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