aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/servers/puppet/init.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-10-03 15:50:50 +0200
committerGitHub <noreply@github.com>2021-10-03 15:50:50 +0200
commitd6f77da92bc4d81f8c3be3a9e84c9972ec8f49d3 (patch)
tree18782e3f893d9d6ca7c1790beb14217a4f894046 /lua/nvim-lsp-installer/servers/puppet/init.lua
parentlower default log level to INFO (#119) (diff)
downloadmason-d6f77da92bc4d81f8c3be3a9e84c9972ec8f49d3.tar
mason-d6f77da92bc4d81f8c3be3a9e84c9972ec8f49d3.tar.gz
mason-d6f77da92bc4d81f8c3be3a9e84c9972ec8f49d3.tar.bz2
mason-d6f77da92bc4d81f8c3be3a9e84c9972ec8f49d3.tar.lz
mason-d6f77da92bc4d81f8c3be3a9e84c9972ec8f49d3.tar.xz
mason-d6f77da92bc4d81f8c3be3a9e84c9972ec8f49d3.tar.zst
mason-d6f77da92bc4d81f8c3be3a9e84c9972ec8f49d3.zip
add puppet (#120)
Diffstat (limited to 'lua/nvim-lsp-installer/servers/puppet/init.lua')
-rw-r--r--lua/nvim-lsp-installer/servers/puppet/init.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/servers/puppet/init.lua b/lua/nvim-lsp-installer/servers/puppet/init.lua
new file mode 100644
index 00000000..f69757c5
--- /dev/null
+++ b/lua/nvim-lsp-installer/servers/puppet/init.lua
@@ -0,0 +1,22 @@
+local path = require "nvim-lsp-installer.path"
+local server = require "nvim-lsp-installer.server"
+local context = require "nvim-lsp-installer.installers.context"
+local std = require "nvim-lsp-installer.installers.std"
+
+return function(name, root_dir)
+ return server.Server:new {
+ name = name,
+ root_dir = root_dir,
+ installer = {
+ context.github_release_file("puppetlabs/puppet-editor-services", function(version)
+ return ("puppet_editor_services_%s.zip"):format(version)
+ end),
+ context.capture(function(ctx)
+ return std.unzip_remote(ctx.github_release_file)
+ end),
+ },
+ default_options = {
+ cmd = { path.concat { root_dir, "puppet-languageserver" }, "--stdio" },
+ },
+ }
+end