lspcontainers.nvim
lspcontainers.nvim copied to clipboard
feat(runtime): add setup option for agnostic runtime support
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.
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})
})
To be included in #92