aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--lua/nvim-lsp-installer/servers/init.lua1
-rw-r--r--lua/nvim-lsp-installer/servers/puppet/init.lua22
3 files changed, 24 insertions, 0 deletions
diff --git a/README.md b/README.md
index 56fec2d9..0e8d250b 100644
--- a/README.md
+++ b/README.md
@@ -176,6 +176,7 @@ local DEFAULT_SETTINGS = {
| OCaml | `ocamlls` |
| PHP | `intelephense` |
| Prisma | `prismals` |
+| Puppet | `puppet` |
| PureScript | `purescriptls` |
| Python | `pylsp` |
| Python | `pyright` |
diff --git a/lua/nvim-lsp-installer/servers/init.lua b/lua/nvim-lsp-installer/servers/init.lua
index f0ed0533..1b91a30a 100644
--- a/lua/nvim-lsp-installer/servers/init.lua
+++ b/lua/nvim-lsp-installer/servers/init.lua
@@ -69,6 +69,7 @@ local CORE_SERVERS = Data.set_of {
"ocamlls",
"omnisharp",
"prismals",
+ "puppet",
"purescriptls",
"pylsp",
"pyright",
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