瀏覽代碼

feat: better kubernetes support (#1679)

Abouzar Parvan 3 年之前
父節點
當前提交
b1ae1e9bfb
共有 1 個文件被更改,包括 30 次插入0 次删除
  1. 30 0
      lua/lsp/providers/yamlls.lua

+ 30 - 0
lua/lsp/providers/yamlls.lua

@@ -0,0 +1,30 @@
+local opts = {
+  settings = {
+    yaml = {
+      hover = true,
+      completion = true,
+      validate = true,
+      schemaStore = {
+        enable = true,
+        url = "https://www.schemastore.org/api/json/catalog.json",
+      },
+      schemas = {
+        kubernetes = {
+          "daemon.{yml,yaml}",
+          "manager.{yml,yaml}",
+          "restapi.{yml,yaml}",
+          "role.{yml,yaml}",
+          "role_binding.{yml,yaml}",
+          "*onfigma*.{yml,yaml}",
+          "*ngres*.{yml,yaml}",
+          "*ecre*.{yml,yaml}",
+          "*eployment*.{yml,yaml}",
+          "*ervic*.{yml,yaml}",
+          "kubectl-edit*.yaml",
+        },
+      },
+    },
+  },
+}
+
+return opts